Skip to content

Commit f0ccea4

Browse files
Remove iterator part
1 parent 86bcb82 commit f0ccea4

File tree

3 files changed

+0
-43
lines changed

3 files changed

+0
-43
lines changed

src/Type/UnionType.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
use DateTimeInterface;
88
use Error;
99
use Exception;
10-
use Iterator;
11-
use IteratorAggregate;
1210
use PHPStan\Php\PhpVersion;
1311
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
1412
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
@@ -31,7 +29,6 @@
3129
use PHPStan\Type\Generic\TemplateUnionType;
3230
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
3331
use Throwable;
34-
use Traversable;
3532
use function array_diff_assoc;
3633
use function array_fill_keys;
3734
use function array_map;
@@ -54,7 +51,6 @@ class UnionType implements CompoundType
5451
public const EQUAL_UNION_CLASSES = [
5552
DateTimeInterface::class => [DateTimeImmutable::class, DateTime::class],
5653
Throwable::class => [Error::class, Exception::class], // phpcs:ignore SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException
57-
Traversable::class => [IteratorAggregate::class, Iterator::class],
5854
];
5955

6056
private bool $sortedTypes = false;

tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,9 +1064,4 @@ public function testBug11857(): void
10641064
$this->analyse([__DIR__ . '/data/bug-11857-builder.php'], []);
10651065
}
10661066

1067-
public function testBug12102(): void
1068-
{
1069-
$this->analyse([__DIR__ . '/data/bug-12102.php'], []);
1070-
}
1071-
10721067
}

tests/PHPStan/Rules/Methods/data/bug-12102.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)