Update Bouncer.php - Called 'count' on Laravel collection, but could have been retrieved as a query. 🪪 larastan.noUnnecessaryCollectionCall

pull/6240/head
Shlee 2 weeks ago committed by GitHub
parent 39d9832aef
commit 3b8f13784b
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