Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jul 27, 2022
1 parent 8e7266b commit bab8e37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Type/Accessory/AccessoryNonFalsyStringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public function isSubTypeOf(Type $otherType): TrinaryLogic
return $otherType->isSuperTypeOf($this);
}

if ($otherType->isNonEmptyString()->yes()) {
return TrinaryLogic::createYes();
}

return $otherType->isNonFalsyString()
->and($otherType instanceof self ? TrinaryLogic::createYes() : TrinaryLogic::createMaybe());
}
Expand Down

0 comments on commit bab8e37

Please sign in to comment.