From a6d4290cfd923ea53e9e784a5cb94c85e54997c1 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 9c6b885f5..60e0eaab3 100644 --- a/src/Utils/Validators.php +++ b/src/Utils/Validators.php @@ -368,6 +368,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; } }