Bugfix: PHPStan kommt damit nicht klar
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user