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