Skip to content

Commit

Permalink
fix: TypedIterableAggregate
Browse files Browse the repository at this point in the history
Do not check `class_implements` against `false` value anymore.
  • Loading branch information
drupol committed Jan 14, 2023
1 parent abd5782 commit 945b4b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/TypedIterableAggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ static function (mixed $variable): string {
return gettype($variable);
}

$interfaces = class_implements($variable);

if ([] === $interfaces || false === $interfaces) {
// There is no need to check for false here anymore, since
// $variable is an object and therefore, the class must exist.
if ([] === $interfaces = class_implements($variable)) {
return $variable::class;
}

Expand Down

0 comments on commit 945b4b8

Please sign in to comment.