Skip to content

Commit 7c9c681

Browse files
committed
Fixes
1 parent c87a867 commit 7c9c681

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Analyser/MutatingScope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ private function resolveType(string $exprString, Expr $node): Type
15141514
} else {
15151515
$items = [];
15161516
foreach ($arm->conds as $filteringExpr) {
1517-
$items[] = new Expr\ArrayItem($filteringExpr);
1517+
$items[] = new Node\ArrayItem($filteringExpr);
15181518
}
15191519
$filteringExpr = new FuncCall(
15201520
new Name\FullyQualified('in_array'),

src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public function locateIdentifier(Reflector $reflector, Identifier $identifier):
114114
'startFilePos' => 1,
115115
'endFilePos' => 4,
116116
]),
117+
null,
117118
new LocatedSource('<?php', $constantName, null),
118119
null,
119120
null,

src/Type/Constant/OversizedArrayBuilder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace PHPStan\Type\Constant;
44

5+
use PhpParser\Node\ArrayItem;
56
use PhpParser\Node\Expr;
67
use PhpParser\Node\Expr\Array_;
78
use PHPStan\Node\Expr\TypeExpr;
@@ -50,13 +51,13 @@ public function build(Array_ $expr, callable $getTypeCallback): Type
5051
} else {
5152
$keyExpr = new TypeExpr($innerKeyType);
5253
}
53-
array_splice($items, $i++, 0, [new Expr\ArrayItem(
54+
array_splice($items, $i++, 0, [new ArrayItem(
5455
new TypeExpr($innerValueType),
5556
$keyExpr,
5657
)]);
5758
}
5859
} else {
59-
array_splice($items, $i, 1, [new Expr\ArrayItem(
60+
array_splice($items, $i, 1, [new ArrayItem(
6061
new TypeExpr($valueType->getIterableValueType()),
6162
new TypeExpr($valueType->getIterableKeyType()),
6263
)]);

0 commit comments

Comments
 (0)