Skip to content

Commit

Permalink
Add true/false as primitive types
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvandevijver authored Dec 19, 2024
1 parent b4285f4 commit 6613741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Handler/UnionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private function matchSimpleType(mixed $data, array $type, Context $context): mi

private function isPrimitiveType(string $type): bool
{
return in_array($type, ['int', 'integer', 'float', 'double', 'bool', 'boolean', 'string', 'array'], true);
return in_array($type, ['int', 'integer', 'float', 'double', 'bool', 'boolean', 'true', 'false', 'string', 'array'], true);
}

private function testPrimitive(mixed $data, string $type, string $format): bool
Expand Down

0 comments on commit 6613741

Please sign in to comment.