diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e69de29..2eff73c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -0,0 +1,7 @@ +parameters: + ignoreErrors: + - message: '#Parameter \#1 \$prefix of static method Illuminate\\Support\\Facades\\Route::prefix\(\) expects string, mixed given\.#' + path: routes/web.php + + - message: '#Parameter \#1 \$asset of function lara_gen_adv_dist_path expects string\|null, mixed given#' + path: src/Http/Controllers/Asset/AssetController.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index dba5a52..f6d409c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -10,3 +10,4 @@ parameters: checkOctaneCompatibility: true checkModelProperties: true checkMissingIterableValueType: false + checkGenericClassInNonGenericObjectType: false diff --git a/src/Http/Controllers/Asset/AssetController.php b/src/Http/Controllers/Asset/AssetController.php index d5b13e4..808e641 100644 --- a/src/Http/Controllers/Asset/AssetController.php +++ b/src/Http/Controllers/Asset/AssetController.php @@ -28,7 +28,7 @@ public function index(Request $request): Response $fileSystem->get($path), 200, [ - 'Content-Type' => pathinfo($asset, PATHINFO_EXTENSION) == 'css' + 'Content-Type' => pathinfo($path, PATHINFO_EXTENSION) == 'css' ? 'text/css' : 'application/javascript', ]