Skip to content

Commit

Permalink
refactor: add never return type on closure (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored Jan 10, 2025
1 parent e942df9 commit fa7eaf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitSelfCallRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureNeverReturnTypeRector;
use Rector\TypeDeclaration\Rector\Closure\ClosureReturnTypeRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;
Expand Down Expand Up @@ -132,4 +133,5 @@
TypedPropertyFromStrictSetUpRector::class,
PreferPHPUnitSelfCallRector::class,
TypedPropertyFromAssignsRector::class,
AddClosureNeverReturnTypeRector::class,
]);
2 changes: 1 addition & 1 deletion src/Http/tests/HttpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public function testPassException(): void

$core = $this->getCore();

$core->setHandler(function ($req, $resp): void {
$core->setHandler(function ($req, $resp): never {
throw new \RuntimeException('error');
});

Expand Down

0 comments on commit fa7eaf5

Please sign in to comment.