| @@ 929-934 (lines=6) @@ | ||
| 926 | break; |
|
| 927 | case T_SELF: |
|
| 928 | case T_PARENT: |
|
| 929 | case T_STATIC: |
|
| 930 | // Self is valid, the others invalid, but were probably intended as type hints. |
|
| 931 | if ($defaultStart === null) { |
|
| 932 | $typeHint = $tokens[$i]['content']; |
|
| 933 | } |
|
| 934 | break; |
|
| 935 | case T_STRING: |
|
| 936 | // This is a string, so it may be a type hint, but it could |
|
| 937 | // also be a constant used as a default value. |
|
| @@ 964-969 (lines=6) @@ | ||
| 961 | $typeHint .= $tokens[$i]['content']; |
|
| 962 | } |
|
| 963 | break; |
|
| 964 | case T_NS_SEPARATOR: |
|
| 965 | // Part of a type hint or default value. |
|
| 966 | if ($defaultStart === null) { |
|
| 967 | $typeHint .= $tokens[$i]['content']; |
|
| 968 | } |
|
| 969 | break; |
|
| 970 | case T_INLINE_THEN: |
|
| 971 | if ($defaultStart === null) { |
|
| 972 | $nullableType = true; |
|