Skip to content

Commit

Permalink
Merge branch '7.5' into 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Oct 28, 2019
2 parents ffc9e37 + d703dcb commit 8635c10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Framework/Constraint/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ protected function matches($other): bool
*/
protected function getCountOf($other): ?int
{
if ($other instanceof \EmptyIterator) {
return 0;
}

if ($other instanceof Countable || \is_array($other)) {
return \count($other);
}

if ($other instanceof \EmptyIterator) {
return 0;
}

if ($other instanceof Traversable) {
while ($other instanceof IteratorAggregate) {
$other = $other->getIterator();
Expand Down

0 comments on commit 8635c10

Please sign in to comment.