Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Dec 9, 2024
1 parent 3746fb4 commit a3edbea
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,19 @@ public function assertRouteRegistered(
?bool $preventsScopedBindings = false,
?array $defaults = [],
?bool $withTrashed = false,
): self
{
if (!is_array($middleware)) {
): self {
if (! is_array($middleware)) {
$middleware = Arr::wrap($middleware);
}

if (!is_array($withoutMiddleware)) {
if (! is_array($withoutMiddleware)) {
$withoutMiddleware = Arr::wrap($withoutMiddleware);
}

$routeRegistered = collect($this->getRouteCollection()->getRoutes())
->contains(function (Route $route) use ($name, $middleware, $withoutMiddleware, $controllerMethod, $controller, $uri, $httpMethods, $domain, $wheres, $isFallback, $enforcesScopedBindings, $preventsScopedBindings, $defaults, $withTrashed) {
foreach (Arr::wrap($httpMethods) as $httpMethod) {
if (!in_array(strtoupper($httpMethod), $route->methods)) {
if (! in_array(strtoupper($httpMethod), $route->methods)) {
return false;
}
}
Expand Down

0 comments on commit a3edbea

Please sign in to comment.