From 3fb20488a90ea31fc7a1df5d26b9634cdabc75f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Fri, 24 Sep 2021 11:43:54 +0200 Subject: [PATCH] Validators::isPhpIdentifier(): Value is always string. (#268) --- src/Utils/Validators.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }