Skip to content

Commit 7525809

Browse files
committed
cache createFromBoolean()
1 parent d8ca221 commit 7525809

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Type/IsSuperTypeOfResult.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ public static function createMaybe(): self
9696

9797
public static function createFromBoolean(bool $value): self
9898
{
99-
return new self(TrinaryLogic::createFromBoolean($value), []);
99+
if ($value === true) {
100+
return self::createYes();
101+
}
102+
return self::createNo();
100103
}
101104

102105
public function toAcceptsResult(): AcceptsResult

0 commit comments

Comments
 (0)