Skip to content

Commit 5ef9399

Browse files
committed
ci: fix phpstan errors
1 parent 15ca1e3 commit 5ef9399

File tree

7 files changed

+31
-17
lines changed

7 files changed

+31
-17
lines changed

app/composer.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@
44
"license": "MIT",
55
"type": "project",
66
"keywords": [
7-
"framework",
8-
"laravel"
7+
"php",
8+
"laravel",
9+
"boilerplate",
10+
"laravel-boilerplate",
11+
"starter-template",
12+
"laravel-package",
13+
"starter-kit",
14+
"laravel-application",
15+
"starter-project",
16+
"laravel-starter-template",
17+
"laravel-starter-kit",
18+
"laravel-api",
19+
"laravel-ddd",
20+
"ddd"
921
],
1022
"require": {
1123
"php": "^8.2",
@@ -17,7 +29,7 @@
1729
"league/fractal": "^0.20.1",
1830
"sentry/sentry-laravel": "^4.5",
1931
"spatie/laravel-fractal": "^6.2",
20-
"spatie/laravel-query-builder": "^5.8",
32+
"spatie/laravel-query-builder": "^6.0",
2133
"spatie/laravel-route-attributes": "^1.22",
2234
"wayofdev/laravel-open-docs": "^2.1"
2335
},

app/composer.lock

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/Bridge/Laravel/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class Application extends LaravelApplication
1212

1313
public function path($path = ''): string
1414
{
15-
return $this->basePath . DIRECTORY_SEPARATOR . 'src/Bridge/Laravel' . ($path ? DIRECTORY_SEPARATOR . $path : $path);
15+
return $this->basePath . DIRECTORY_SEPARATOR . 'src/Bridge/Laravel' . ($path !== '' ? DIRECTORY_SEPARATOR . $path : $path);
1616
}
1717
}

app/src/Bridge/Laravel/Http/Middleware/RedirectIfAuthenticated.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ final class RedirectIfAuthenticated
1919
*/
2020
public function handle(Request $request, Closure $next, string ...$guards): Response
2121
{
22+
// @phpstan-ignore-next-line
2223
$guards = empty($guards) ? [null] : $guards;
2324

2425
foreach ($guards as $guard) {

app/src/Bridge/Laravel/Providers/EventServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class EventServiceProvider extends ServiceProvider
1313
/**
1414
* The event to listener mappings for the application.
1515
*
16-
* @var array<class-string, array<int, class-string>>
16+
* @var array<string, array<int, string>>
1717
*/
1818
protected $listen = [
1919
Registered::class => [

app/src/Bridge/Laravel/Providers/RouteServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class RouteServiceProvider extends ServiceProvider
2727
public function boot(): void
2828
{
2929
RateLimiter::for('api', function (Request $request) {
30-
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
30+
return Limit::perMinute(60)->by($request->user()?->id ?? $request->ip());
3131
});
3232

3333
$this->routes(function (): void {

app/src/Support/Filters/FuzzyFilter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ public function __construct(string ...$fields)
1919
$this->fields = $fields;
2020
}
2121

22-
public function __invoke(Builder $query, $value, string $property): Builder
22+
public function __invoke(Builder $query, mixed $value, string $property): Builder
2323
{
2424
$query->where(function (Builder $query) use ($value): void {
2525
foreach ($this->fields as $field) {
2626
$values = (array) $value;
2727

28-
foreach ($values as $value) {
29-
$query->orWhere($field, 'LIKE', "%{$value}%");
28+
foreach ($values as $item) {
29+
$query->orWhere($field, 'LIKE', "%{$item}%");
3030
}
3131
}
3232
});

0 commit comments

Comments
 (0)