Skip to content

Commit

Permalink
Use in_array to simplify foreach statment
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel authored and sebastianbergmann committed Nov 5, 2018
1 parent 55a0862 commit 1349e75
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1994,13 +1994,7 @@ private function shouldInvocationMockerBeReset(MockObject $mock): bool
return true;
}

foreach ($enumerator->enumerate($this->testResult) as $object) {
if ($mock === $object) {
return false;
}
}

return true;
return !\in_array($mock, $enumerator->enumerate($this->testResult), true);
}

/**
Expand Down

0 comments on commit 1349e75

Please sign in to comment.