Skip to content

Commit

Permalink
No need to create 2 collections. (#26151)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored and taylorotwell committed Oct 18, 2018
1 parent 6774f83 commit d995e23
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Illuminate/Support/Testing/Fakes/QueueFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,9 @@ protected function assertPushedWithChainOfClasses($job, $expectedChain, $callbac
*/
protected function isChainOfObjects($chain)
{
return collect($chain)->count() == collect($chain)
->filter(function ($job) {
return is_object($job);
})->count();
return ! collect($chain)->contains(function ($job) {
return ! is_object($job);
});
}

/**
Expand Down

0 comments on commit d995e23

Please sign in to comment.