Skip to content

Commit

Permalink
VoidType::accepts - support CompoundType
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 24, 2021
1 parent e88491b commit 8b4cab5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Type/VoidType.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public function getReferencedClasses(): array

public function accepts(Type $type, bool $strictTypes): TrinaryLogic
{
if ($type instanceof CompoundType) {
return $type->isAcceptedBy($this, $strictTypes);
}

return TrinaryLogic::createFromBoolean($type instanceof self);
}

Expand Down

0 comments on commit 8b4cab5

Please sign in to comment.