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 authored and dg committed Sep 24, 2021
1 parent d7c54f2 commit 9b19930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/Validators.php
Expand Up @@ -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;
}
}

0 comments on commit 9b19930

Please sign in to comment.