Skip to content

Commit

Permalink
Revert "Explicit NeverType: accept nothing"
Browse files Browse the repository at this point in the history
This reverts commit 25c8312.
  • Loading branch information
ondrejmirtes committed Dec 15, 2022
1 parent 25c8312 commit 42b015d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 110 deletions.
4 changes: 0 additions & 4 deletions src/Type/NeverType.php
Expand Up @@ -63,10 +63,6 @@ public function getConstantStrings(): array

public function accepts(Type $type, bool $strictTypes): TrinaryLogic
{
if ($this->isExplicit()) {
return $this->isSuperTypeOf($type);
}

return TrinaryLogic::createYes();
}

Expand Down
10 changes: 0 additions & 10 deletions tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php
Expand Up @@ -262,14 +262,4 @@ public function testStaticCallInFunctions(): void
$this->analyse([__DIR__ . '/data/static-call-in-functions.php'], []);
}

public function testBug6485(): void
{
$this->analyse([__DIR__ . '/data/bug-6485.php'], [
[
'Parameter #1 $ of closure expects *NEVER*, TBlockType of Bug6485\\Block given.',
28,
],
]);
}

}
31 changes: 0 additions & 31 deletions tests/PHPStan/Rules/Functions/data/bug-6485.php

This file was deleted.

4 changes: 0 additions & 4 deletions tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php
Expand Up @@ -2584,10 +2584,6 @@ public function testUnresolvableParameter(): void
'Parameter #2 $v of method UnresolvableParameter\HelloWorld::foo() contains unresolvable type.',
19,
],
[
'Parameter #2 $v of method UnresolvableParameter\HelloWorld::foo() expects *NEVER*, 0 given.',
20,
],
]);
}

Expand Down
61 changes: 0 additions & 61 deletions tests/PHPStan/Type/NeverTypeTest.php

This file was deleted.

0 comments on commit 42b015d

Please sign in to comment.