Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
fix: some error in phpstan analyse
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jan 10, 2024
1 parent 65660b5 commit d7a86ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ parameters:
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
2 changes: 1 addition & 1 deletion src/Http/Controllers/Asset/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down

0 comments on commit d7a86ed

Please sign in to comment.