Skip to content

Commit

Permalink
Merge branch '4.x' into 0-assign-null-coalescing-to-coalesce-equal
Browse files Browse the repository at this point in the history
  • Loading branch information
l0gicgate authored Jul 7, 2022
2 parents 399e84a + fbb442e commit beef649
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Slim/Middleware/BodyParsingMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected function parseBody(ServerRequestInterface $request)
$body = (string)$request->getBody();
$parsed = $this->bodyParsers[$mediaType]($body);

if (!is_null($parsed) && !is_object($parsed) && !is_array($parsed)) {
if ($parsed !== null && !is_object($parsed) && !is_array($parsed)) {
throw new RuntimeException(
'Request body media type parser return value must be an array, an object, or null'
);
Expand Down
2 changes: 1 addition & 1 deletion Slim/Routing/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function createDispatcher(): FastRouteDispatcher
return $this->dispatcher;
}

$routeDefinitionCallback = function (FastRouteCollector $r) {
$routeDefinitionCallback = function (FastRouteCollector $r): void {
$basePath = $this->routeCollector->getBasePath();

foreach ($this->routeCollector->getRoutes() as $route) {
Expand Down

0 comments on commit beef649

Please # to comment.