Skip to content

Commit

Permalink
Should have fixed static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGhostHunter committed Feb 22, 2023
2 parents 3c5ebe1 + aee26e3 commit bcdba39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/BootHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use Illuminate\Contracts\Http\Kernel as KernelContract;
use Illuminate\Contracts\Validation\Factory;
use Illuminate\Routing\Router;
use Laragear\Meta\Http\Middleware\MiddlewareDeclaration;
use function is_callable;
use function is_string;
use Laragear\Meta\Http\Middleware\MiddlewareDeclaration;

trait BootHelpers
{
Expand Down Expand Up @@ -67,6 +67,7 @@ static function (Factory $validator, Application $app) use ($message, $callback,
* Returns a middleware declaration.
*
* @template TValue
*
* @param TValue|class-string|string $class
* @return \Laragear\Meta\Http\Middleware\MiddlewareDeclaration<TValue>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Middleware/MiddlewareDeclaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MiddlewareDeclaration
*
* @param \Illuminate\Routing\Router $router
* @param \Illuminate\Foundation\Http\Kernel $kernel
* @param TValue|class-string|string $middleware
* @param class-string|string $middleware
*/
public function __construct(
protected readonly Router $router,
Expand Down
3 changes: 2 additions & 1 deletion tests/Http/Middleware/MiddlewareDeclarationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ protected function setUp(): void
{
parent::setUp();

$this->declaration = (new class($this->app) extends ServiceProvider {
$this->declaration = (new class($this->app) extends ServiceProvider
{
use BootHelpers;

public function getDeclaration()
Expand Down

0 comments on commit bcdba39

Please sign in to comment.