Skip to content

Commit

Permalink
Apply Rector changes (CI)
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz authored and github-actions[bot] committed Dec 27, 2023
1 parent 5893cbb commit e867fe7
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions src/FileRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,13 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface

private function parseAction(ServerRequestInterface $request): ?string
{
switch ($request->getMethod()) {
case 'HEAD':
case 'GET':
$action = 'index';
break;
case 'POST':
$action = 'create';
break;
case 'PUT':
$action = 'update';
break;
case 'DELETE':
$action = 'delete';
break;
default:
throw new Exception('Not implemented.');
}
$action = match ($request->getMethod()) {
'HEAD', 'GET' => 'index',
'POST' => 'create',
'PUT' => 'update',
'DELETE' => 'delete',
default => throw new Exception('Not implemented.'),

Check failure on line 77 in src/FileRouter.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.1-ubuntu-latest

InternalClass

src/FileRouter.php:77:30: InternalClass: PHPUnit\Logging\Exception is internal to PHPUnit but called from Yiisoft\FileRouter\FileRouter (see https://psalm.dev/174)

Check failure on line 77 in src/FileRouter.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.2-ubuntu-latest

InternalClass

src/FileRouter.php:77:30: InternalClass: PHPUnit\Logging\Exception is internal to PHPUnit but called from Yiisoft\FileRouter\FileRouter (see https://psalm.dev/174)

Check failure on line 77 in src/FileRouter.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.3-ubuntu-latest

InternalClass

src/FileRouter.php:77:30: InternalClass: PHPUnit\Logging\Exception is internal to PHPUnit but called from Yiisoft\FileRouter\FileRouter (see https://psalm.dev/174)
};
return $action;
}

Expand Down

0 comments on commit e867fe7

Please sign in to comment.