Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Jun 5, 2024
1 parent 727c5fd commit 2fc7c0c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
32 changes: 11 additions & 21 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parameters:
path: src/ContextProviders/LaravelLivewireRequestContextProvider.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\ContextProviders\\\\LaravelLivewireRequestContextProvider\\:\\:resolveUpdates\\(\\) has parameter \\$updates with no value type specified in iterable type array\\.$#"
message: "#^Method Spatie\\\\LaravelFlare\\\\ContextProviders\\\\LaravelLivewireRequestContextProvider\\:\\:resolveUpdates\\(\\) has parameter \\$updates with no value type specified in iterable type array\\.$#"
count: 1
path: src/ContextProviders/LaravelLivewireRequestContextProvider.php

Expand All @@ -31,12 +31,12 @@ parameters:
path: src/ContextProviders/LaravelRequestContextProvider.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\ContextProviders\\\\LaravelRequestContextProvider\\:\\:toArray\\(\\) should return array\\<int, mixed\\> but returns array\\<string, mixed\\>\\.$#"
message: "#^Method Spatie\\\\LaravelFlare\\\\ContextProviders\\\\LaravelRequestContextProvider\\:\\:toArray\\(\\) should return array\\<int, mixed\\> but returns array\\<string, mixed\\>\\.$#"
count: 1
path: src/ContextProviders/LaravelRequestContextProvider.php

-
message: "#^Return type \\(array\\<int, mixed\\>\\) of method Spatie\\\\LaravelIgnition\\\\ContextProviders\\\\LaravelRequestContextProvider\\:\\:toArray\\(\\) should be compatible with return type \\(array\\<string, mixed\\>\\) of method Spatie\\\\FlareClient\\\\Context\\\\RequestContextProvider\\:\\:toArray\\(\\)$#"
message: "#^Return type \\(array\\<int, mixed\\>\\) of method Spatie\\\\LaravelFlare\\\\ContextProviders\\\\LaravelRequestContextProvider\\:\\:toArray\\(\\) should be compatible with return type \\(array\\<string, mixed\\>\\) of method Spatie\\\\FlareClient\\\\Context\\\\RequestContextProvider\\:\\:toArray\\(\\)$#"
count: 1
path: src/ContextProviders/LaravelRequestContextProvider.php

Expand All @@ -46,12 +46,7 @@ parameters:
path: src/Exceptions/InvalidConfig.php

-
message: "#^Class Livewire\\\\LivewireComponentsFinder not found\\.$#"
count: 1
path: src/Solutions/LivewireDiscoverSolution.php

-
message: "#^Parameter \\#1 \\$invalidController of method Spatie\\\\LaravelIgnition\\\\Solutions\\\\SolutionProviders\\\\InvalidRouteActionSolutionProvider\\:\\:findRelatedController\\(\\) expects string, string\\|null given\\.$#"
message: "#^Parameter \\#1 \\$invalidController of method Spatie\\\\LaravelFlare\\\\Solutions\\\\SolutionProviders\\\\InvalidRouteActionSolutionProvider\\:\\:findRelatedController\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: src/Solutions/SolutionProviders/InvalidRouteActionSolutionProvider.php

Expand All @@ -66,7 +61,7 @@ parameters:
path: src/Solutions/SolutionProviders/InvalidRouteActionSolutionProvider.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\Solutions\\\\SolutionProviders\\\\UnknownValidationSolutionProvider\\:\\:getAvailableMethods\\(\\) return type with generic class Illuminate\\\\Support\\\\Collection does not specify its types\\: TKey, TValue$#"
message: "#^Method Spatie\\\\LaravelFlare\\\\Solutions\\\\SolutionProviders\\\\UnknownValidationSolutionProvider\\:\\:getAvailableMethods\\(\\) return type with generic class Illuminate\\\\Support\\\\Collection does not specify its types\\: TKey, TValue$#"
count: 1
path: src/Solutions/SolutionProviders/UnknownValidationSolutionProvider.php

Expand All @@ -86,7 +81,7 @@ parameters:
path: src/Solutions/SolutionProviders/UnknownValidationSolutionProvider.php

-
message: "#^Parameter \\#1 \\$missingView of method Spatie\\\\LaravelIgnition\\\\Solutions\\\\SolutionProviders\\\\ViewNotFoundSolutionProvider\\:\\:findRelatedView\\(\\) expects string, string\\|null given\\.$#"
message: "#^Parameter \\#1 \\$missingView of method Spatie\\\\LaravelFlare\\\\Solutions\\\\SolutionProviders\\\\ViewNotFoundSolutionProvider\\:\\:findRelatedView\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: src/Solutions/SolutionProviders/ViewNotFoundSolutionProvider.php

Expand Down Expand Up @@ -126,22 +121,22 @@ parameters:
path: src/Views/ViewExceptionMapper.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\Views\\\\ViewExceptionMapper\\:\\:filterViewData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
message: "#^Method Spatie\\\\LaravelFlare\\\\Views\\\\ViewExceptionMapper\\:\\:filterViewData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
path: src/Views/ViewExceptionMapper.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\Views\\\\ViewExceptionMapper\\:\\:filterViewData\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Method Spatie\\\\LaravelFlare\\\\Views\\\\ViewExceptionMapper\\:\\:filterViewData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Views/ViewExceptionMapper.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\Views\\\\ViewExceptionMapper\\:\\:getKnownPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Method Spatie\\\\LaravelFlare\\\\Views\\\\ViewExceptionMapper\\:\\:getKnownPaths\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Views/ViewExceptionMapper.php

-
message: "#^Method Spatie\\\\LaravelIgnition\\\\Views\\\\ViewExceptionMapper\\:\\:getViewData\\(\\) return type has no value type specified in iterable type array\\.$#"
message: "#^Method Spatie\\\\LaravelFlare\\\\Views\\\\ViewExceptionMapper\\:\\:getViewData\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Views/ViewExceptionMapper.php

Expand All @@ -151,12 +146,7 @@ parameters:
path: src/Views/ViewExceptionMapper.php

-
message: "#^Property Spatie\\\\LaravelIgnition\\\\Views\\\\ViewExceptionMapper\\:\\:\\$knownPaths type has no value type specified in iterable type array\\.$#"
message: "#^Property Spatie\\\\LaravelFlare\\\\Views\\\\ViewExceptionMapper\\:\\:\\$knownPaths type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Views/ViewExceptionMapper.php

-
message: "#^Function ddd\\(\\) has no return type specified\\.$#"
count: 1
path: src/helpers.php

4 changes: 1 addition & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ parameters:
- src
- config
excludePaths:
- src/Renderers/IgnitionExceptionRenderer
- src/Recorders/JobRecorder/JobRecorder
- src/Recorders/DumpRecorder/HtmlDumper
- src/Recorders/DumpRecorder/DumpRecorder
- src/IgnitionServiceProvider
- src/Http
- src/FlareServiceProvider
- src/FlareMiddleware
- src/Support/LivewireComponentParser
- src/Solutions/SolutionProviders/SolutionProviderRepository
Expand Down
2 changes: 1 addition & 1 deletion src/FlareServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function register(): void
$this->registerLogHandler();
}

public function boot()
public function boot(): void
{
if ($this->app->runningInConsole()) {
$this->registerCommands();
Expand Down

0 comments on commit 2fc7c0c

Please sign in to comment.