Skip to content
Permalink
Browse files

Allow class constant names to begin with lower-case (#2002)

Followup to e58ade5
  • Loading branch information...
TysonAndre authored and muglug committed Aug 11, 2019
1 parent b88fe2c commit f1de94967b65ba4f6d89e3b1150c7e21df972472
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Psalm/Internal/Type/ParseTree.php
@@ -514,7 +514,7 @@ public static function createFromTokens(array $type_tokens)
$nexter_token = $i + 2 < $c ? $type_tokens[$i + 2] : null;
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')
) {
throw new TypeParseTreeException(

0 comments on commit f1de949

Please sign in to comment.
You can’t perform that action at this time.