| @@ 999-1004 (lines=6) @@ | ||
| 996 | break; |
|
| 997 | case T_SELF: |
|
| 998 | case T_PARENT: |
|
| 999 | case T_STATIC: |
|
| 1000 | // Self is valid, the others invalid, but were probably intended as type hints. |
|
| 1001 | if ($defaultStart === null) { |
|
| 1002 | $typeHint = $tokens[$i]['content']; |
|
| 1003 | } |
|
| 1004 | break; |
|
| 1005 | case T_STRING: |
|
| 1006 | // This is a string, so it may be a type hint, but it could |
|
| 1007 | // also be a constant used as a default value. |
|
| @@ 1034-1039 (lines=6) @@ | ||
| 1031 | $typeHint .= $tokens[$i]['content']; |
|
| 1032 | } |
|
| 1033 | break; |
|
| 1034 | case T_NS_SEPARATOR: |
|
| 1035 | // Part of a type hint or default value. |
|
| 1036 | if ($defaultStart === null) { |
|
| 1037 | $typeHint .= $tokens[$i]['content']; |
|
| 1038 | } |
|
| 1039 | break; |
|
| 1040 | case T_INLINE_THEN: |
|
| 1041 | if ($defaultStart === null) { |
|
| 1042 | $nullableType = true; |
|