Skip to content

Commit b897b8d

Browse files
Remove iterator part
1 parent 84030b2 commit b897b8d

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
@@ -1096,9 +1096,4 @@ public function testBug11857(): void
10961096
$this->analyse([__DIR__ . '/data/bug-11857-builder.php'], []);
10971097
}
10981098

1099-
public function testBug12102(): void
1100-
{
1101-
$this->analyse([__DIR__ . '/data/bug-12102.php'], []);
1102-
}
1103-
11041099
}

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

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

0 commit comments

Comments
 (0)