diff --git a/src/Utils/Validators.php b/src/Utils/Validators.php index 7d1e57779..b9ee50b20 100644 --- a/src/Utils/Validators.php +++ b/src/Utils/Validators.php @@ -355,6 +355,6 @@ public static function isType(string $type): bool */ public static function isPhpIdentifier(string $value): bool { - return is_string($value) && preg_match('#^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$#D', $value); + return preg_match('#^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$#D', $value) === 1; } }