We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00217d6 commit 204a282Copy full SHA for 204a282
src/Rector/ToNativeRector.php
@@ -4,6 +4,7 @@
4
5
use Illuminate\Support\Arr;
6
use PhpParser\Node;
7
+use PHPStan\Type\NeverType;
8
use PHPStan\Type\ObjectType;
9
use Rector\Contract\Rector\ConfigurableRectorInterface;
10
use Rector\PhpParser\Node\Value\ValueResolver;
@@ -36,6 +37,10 @@ public function configure(array $configuration): void
36
37
38
protected function inConfiguredClasses(Node $node): bool
39
{
40
+ if ($this->getType($node) instanceof NeverType) {
41
+ return false;
42
+ }
43
+
44
foreach ($this->classes as $class) {
45
if ($this->isObjectType($node, $class)) {
46
return true;
0 commit comments