mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:34:04 +00:00
Apply fixes from StyleCI
This commit is contained in:
parent
ed200ab733
commit
d94ff22170
2 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Features;
|
namespace Stancl\Tenancy\Features;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
|
|
@ -38,7 +40,7 @@ class UniversalRoutes implements Feature
|
||||||
// groups have the searhced middleware group inside them
|
// groups have the searhced middleware group inside them
|
||||||
$middlewareGroups = Router::getMiddlewareGroups();
|
$middlewareGroups = Router::getMiddlewareGroups();
|
||||||
foreach ($route->gatherMiddleware() as $inner) {
|
foreach ($route->gatherMiddleware() as $inner) {
|
||||||
if (!$inner instanceof Closure && isset($middlewareGroups[$inner]) && in_array($middleware, $middlewareGroups[$inner], true)) {
|
if (! $inner instanceof Closure && isset($middlewareGroups[$inner]) && in_array($middleware, $middlewareGroups[$inner], true)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Tests;
|
namespace Stancl\Tenancy\Tests;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
@ -31,7 +33,7 @@ class UniversalRouteTest extends TestCase
|
||||||
$this->get('http://localhost/foo')
|
$this->get('http://localhost/foo')
|
||||||
->assertSuccessful()
|
->assertSuccessful()
|
||||||
->assertSee('Tenancy is not initialized.');
|
->assertSee('Tenancy is not initialized.');
|
||||||
|
|
||||||
$tenant = Tenant::create([
|
$tenant = Tenant::create([
|
||||||
'id' => 'acme',
|
'id' => 'acme',
|
||||||
]);
|
]);
|
||||||
|
|
@ -61,4 +63,4 @@ class UniversalRouteTest extends TestCase
|
||||||
->assertSuccessful()
|
->assertSuccessful()
|
||||||
->assertSee('acme');
|
->assertSee('acme');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue