Commit 86aa740
Fix ClassConstantAccessType resolution and array shape offset handling
1. Add `use function count` to fix coding standard error
2. In getResult(), return value type directly when inner type is StaticType.
This prevents premature resolution to `mixed` during decideType() which
would cause the native return type to override the PHPDoc type before
transformStaticType() has a chance to replace StaticType with a concrete
ObjectType. After transformation, the new instance resolves correctly.
3. Revert resolveArrayShapeOffsetType to treat static:: like self:: because
array shape keys need concrete ConstantStringType values, not
ClassConstantAccessType which resolves to mixed for untyped constants.
Co-authored-by: Ondřej Mirtes <ondrejmirtes@users.noreply.github.com>1 parent 10fdb06 commit 86aa740
File tree
2 files changed
+15
-23
lines changed- src
- PhpDoc
- Type
2 files changed
+15
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1202 | 1202 | | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | | - | |
1206 | 1205 | | |
1207 | 1206 | | |
1208 | 1207 | | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | 1208 | | |
1214 | 1209 | | |
1215 | 1210 | | |
| |||
1238 | 1233 | | |
1239 | 1234 | | |
1240 | 1235 | | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | 1236 | | |
1246 | 1237 | | |
1247 | 1238 | | |
| |||
1258 | 1249 | | |
1259 | 1250 | | |
1260 | 1251 | | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | 1252 | | |
1272 | 1253 | | |
1273 | 1254 | | |
| |||
1296 | 1277 | | |
1297 | 1278 | | |
1298 | 1279 | | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
1302 | | - | |
1303 | 1280 | | |
1304 | 1281 | | |
1305 | 1282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
54 | 69 | | |
55 | 70 | | |
56 | 71 | | |
| |||
0 commit comments