Skip to content

Commit 6ef434c

Browse files
committed
Revert "Added Enum stubs to make method purity precise"
This reverts commit d05e42c.
1 parent f54f785 commit 6ef434c

File tree

5 files changed

+2
-56
lines changed

5 files changed

+2
-56
lines changed

src/PhpDoc/ReflectionEnumStubFilesExtension.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,11 @@ public function getFiles(): array
1919
return [];
2020
}
2121

22-
$files = [
23-
__DIR__ . '/../../stubs/UnitEnum.stub',
24-
__DIR__ . '/../../stubs/BackedEnum.stub',
25-
];
26-
2722
if (!$this->phpVersion->supportsLazyObjects()) {
28-
return [__DIR__ . '/../../stubs/ReflectionEnum.stub', ...$files];
23+
return [__DIR__ . '/../../stubs/ReflectionEnum.stub'];
2924
}
3025

31-
return [__DIR__ . '/../../stubs/ReflectionEnumWithLazyObjects.stub', ...$files];
26+
return [__DIR__ . '/../../stubs/ReflectionEnumWithLazyObjects.stub'];
3227
}
3328

3429
}

stubs/BackedEnum.stub

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

stubs/UnitEnum.stub

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

tests/PHPStan/Rules/Pure/PureFunctionRuleTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,4 @@ public function testBug12224(): void
174174
]);
175175
}
176176

177-
#[RequiresPhp('>= 8.1')]
178-
public function testBug13201(): void
179-
{
180-
$this->analyse([__DIR__ . '/data/bug-13201.php'], []);
181-
}
182-
183177
}

tests/PHPStan/Rules/Pure/data/bug-13201.php

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

0 commit comments

Comments
 (0)