Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Oct 25, 2023
1 parent 697a116 commit 34b4d52
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Illuminate/Routing/RoutingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,10 @@ protected function registerPsrRequest()
if (class_exists(Psr17Factory::class) && class_exists(PsrHttpFactory::class)) {
$psr17Factory = new Psr17Factory;

return with(
(new PsrHttpFactory($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory))
->createRequest($illuminateRequest = $app->make('request')),
static fn ($request) => $request->withParsedBody(
array_merge($request->getParsedBody() ?? [], $illuminateRequest->getPayload()->all())
)
);
return with((new PsrHttpFactory($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory))
->createRequest($illuminateRequest = $app->make('request')), fn ($request) => $request->withParsedBody(
array_merge($request->getParsedBody() ?? [], $illuminateRequest->getPayload()->all())
));
}

throw new BindingResolutionException('Unable to resolve PSR request. Please install the symfony/psr-http-message-bridge and nyholm/psr7 packages.');
Expand Down

0 comments on commit 34b4d52

Please sign in to comment.