Merge pull request #6240 from pixelfed/shleeable-patch-2

larastan: Update Bouncer.php - Called 'count' on Laravel collection, but could have been retrieved as a query. (noUnnecessaryCollectionCall)
pull/6261/head
dansup 2 weeks ago committed by GitHub
commit 3fbeb53eeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -47,9 +47,8 @@ class Bouncer {
return false;
}
$count = Status::select('id', 'scope')
->whereScope('public')
->find($ids)
$count = Status::whereScope('public')
->whereIn('id', $ids)
->count();
return $count >= 1 ? true : false;

Loading…
Cancel
Save