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 Oct 11, 2021
1 parent 26d6fe2 commit a6d4290
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 a6d4290

Please sign in to comment.