diff --git a/src/Assert.php b/src/Assert.php index 6e76415..097bdfa 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -137,6 +137,11 @@ protected static function isCompatibleWithType(string $type, $value): bool return \get_class($value) === $type || \is_subclass_of($value, $type); } - return \gettype($value) === $type; + $gettype = \gettype($value); + if ($gettype === 'boolean') { + $gettype = 'bool'; + } + + return $gettype === $type; } }