Skip to content

Commit

Permalink
Allow class constant names to begin with lower-case (#2002)
Browse files Browse the repository at this point in the history
Followup to e58ade5
  • Loading branch information
TysonAndre authored and muglug committed Aug 11, 2019
1 parent b88fe2c commit f1de949
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Type/ParseTree.php
Expand Up @@ -514,7 +514,7 @@ public static function createFromTokens(array $type_tokens)
$nexter_token = $i + 2 < $c ? $type_tokens[$i + 2] : null; $nexter_token = $i + 2 < $c ? $type_tokens[$i + 2] : null;


if (!$nexter_token if (!$nexter_token
|| (!preg_match('/^[A-Z_][a-zA-Z_0-9]*$/', $nexter_token[0]) || (!preg_match('/^[a-zA-Z_][a-zA-Z_0-9]*$/', $nexter_token[0])
&& strtolower($nexter_token[0]) !== 'class') && strtolower($nexter_token[0]) !== 'class')
) { ) {
throw new TypeParseTreeException( throw new TypeParseTreeException(
Expand Down

0 comments on commit f1de949

Please sign in to comment.