Skip to content

Commit

Permalink
Validators::isPhpIdentifier(): Value is always string. (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Sep 24, 2021
1 parent fb6e92a commit 3fb2048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/Validators.php
Expand Up @@ -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;
}
}

0 comments on commit 3fb2048

Please sign in to comment.