Skip to content

Commit a31d761

Browse files
renovate[bot]github-actions[bot]
authored andcommitted
chore: fix styling and refactor via PHP CS Fixer, Rector, phpcbf
1 parent 3bfadd8 commit a31d761

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Core/Container.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ private function autowire(string $class): mixed
131131
}
132132

133133
$args = [];
134-
foreach ($ctor->getParameters() as $parameter) {
135-
$t = $parameter->getType();
134+
foreach ($ctor->getParameters() as $reflectionParameter) {
135+
$t = $reflectionParameter->getType();
136136

137137
// Resolve class dependencies recursively
138138
/** @var \ReflectionNamedType|null $t */
@@ -142,7 +142,7 @@ private function autowire(string $class): mixed
142142
}
143143

144144
// Use default value if available, otherwise null
145-
$args[] = $parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null;
145+
$args[] = $reflectionParameter->isDefaultValueAvailable() ? $reflectionParameter->getDefaultValue() : null;
146146
}
147147

148148
return $reflectionClass->newInstanceArgs($args);

src/Core/Events/MiddlewarePipeline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function buildStack(callable $finalHandler): callable
9191
{
9292
return array_reduce(
9393
array_reverse($this->middlewares),
94-
fn ($next, $middleware): \Closure => fn (Request $request, Response $response) => $this->invokeMiddleware($middleware, $request, $response, $next),
94+
fn (callable $next, callable|string $middleware): \Closure => fn (Request $request, Response $response) => $this->invokeMiddleware($middleware, $request, $response, $next),
9595
$finalHandler
9696
);
9797
}

0 commit comments

Comments
 (0)