Skip to content

Commit e9e6b7a

Browse files
committed
[ci-review] Rector Rectify
1 parent 147e6b1 commit e9e6b7a

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
use PhpParser\Node\Identifier;
1313
use PhpParser\Node\VariadicPlaceholder;
1414
use PHPStan\Reflection\ReflectionProvider;
15-
use PHPStan\Type\Accessory\AccessoryArrayListType;
1615
use PHPStan\Type\ArrayType;
1716
use PHPStan\Type\Constant\ConstantArrayType;
18-
use PHPStan\Type\IntersectionType;
1917
use PHPStan\Type\MixedType;
2018
use PHPStan\Type\NeverType;
2119
use PHPStan\Type\ObjectType;
@@ -234,26 +232,4 @@ private function isArrayMixedMixedType(Type $type): bool
234232

235233
return $type->getKeyType() instanceof MixedType || $type->getKeyType() instanceof NeverType;
236234
}
237-
238-
private function cleanArrayIntersectionType(Type $type): Type
239-
{
240-
if (! $type instanceof IntersectionType) {
241-
return $type;
242-
}
243-
244-
$cleanTypes = [];
245-
foreach ($type->getTypes() as $intersectionType) {
246-
if ($intersectionType instanceof AccessoryArrayListType) {
247-
continue;
248-
}
249-
250-
$cleanTypes[] = $intersectionType;
251-
}
252-
253-
if (count($cleanTypes) === 1) {
254-
return $cleanTypes[0];
255-
}
256-
257-
return new IntersectionType($cleanTypes);
258-
}
259235
}

0 commit comments

Comments
 (0)