| @@ 1037-1042 (lines=6) @@ | ||
| 1034 | break; |
|
| 1035 | case T_SELF: |
|
| 1036 | case T_PARENT: |
|
| 1037 | case T_STATIC: |
|
| 1038 | // Self is valid, the others invalid, but were probably intended as type hints. |
|
| 1039 | if ($defaultStart === null) { |
|
| 1040 | $typeHint = $tokens[$i]['content']; |
|
| 1041 | } |
|
| 1042 | break; |
|
| 1043 | case T_STRING: |
|
| 1044 | // This is a string, so it may be a type hint, but it could |
|
| 1045 | // also be a constant used as a default value. |
|
| @@ 1072-1077 (lines=6) @@ | ||
| 1069 | $typeHint .= $tokens[$i]['content']; |
|
| 1070 | } |
|
| 1071 | break; |
|
| 1072 | case T_NS_SEPARATOR: |
|
| 1073 | // Part of a type hint or default value. |
|
| 1074 | if ($defaultStart === null) { |
|
| 1075 | $typeHint .= $tokens[$i]['content']; |
|
| 1076 | } |
|
| 1077 | break; |
|
| 1078 | case T_INLINE_THEN: |
|
| 1079 | if ($defaultStart === null) { |
|
| 1080 | $nullableType = true; |
|