bugfix/rest-api-phpstan #21

Merged
TorstenHettstedt merged 2 commits from bugfix/rest-api-phpstan into master 2021-12-15 19:50:36 +01:00
Showing only changes of commit 371425f3c5 - Show all commits
+10 -6
View File
@@ -46,13 +46,17 @@ class ErrorHandlerTest extends Unit
]); ]);
/** @noinspection PhpFieldAssignmentTypeMismatchInspection */ /** @noinspection PhpFieldAssignmentTypeMismatchInspection */
$this->request = $this->makeEmpty(ServerRequestInterface::class, [ $this->request = $this->makeEmpty(ServerRequestInterface::class, [
'getAttribute' => function($name) { 'getAttribute' => function ($name) {
return match ($name) { /** @noinspection PhpSwitchCanBeReplacedWithMatchExpressionInspection */
RouteContext::ROUTE_PARSER => $this->makeEmpty(RouteParserInterface::class), switch ($name) {
RouteContext::ROUTING_RESULTS => $this->makeEmpty(RoutingResults::class), case RouteContext::ROUTE_PARSER:
default => null, return $this->makeEmpty(RouteParserInterface::class);
}; case RouteContext::ROUTING_RESULTS:
return $this->makeEmpty(RoutingResults::class);
default:
return null;
} }
},
]); ]);
} }