diff --git a/src/DiscoverSolutionProviders.php b/src/DiscoverSolutionProviders.php index af062d1..107db0e 100644 --- a/src/DiscoverSolutionProviders.php +++ b/src/DiscoverSolutionProviders.php @@ -6,11 +6,11 @@ class DiscoverSolutionProviders { - /** @var array*/ + /** @var array */ protected array $config = [ 'ai' => 'SolutionProviders/OpenAi', 'php' => 'SolutionProviders', - 'laravel' => 'SolutionProviders/Laravel' + 'laravel' => 'SolutionProviders/Laravel', ]; /** @@ -62,7 +62,7 @@ protected function getProviderClassesForType(string $type): array $files = glob($globPattern); - if (!$files) { + if (! $files) { return []; } diff --git a/src/SolutionProviders/Laravel/UndefinedViewVariableSolutionProvider.php b/src/SolutionProviders/Laravel/UndefinedViewVariableSolutionProvider.php index 194450c..d2316e8 100644 --- a/src/SolutionProviders/Laravel/UndefinedViewVariableSolutionProvider.php +++ b/src/SolutionProviders/Laravel/UndefinedViewVariableSolutionProvider.php @@ -5,10 +5,10 @@ use Spatie\ErrorSolutions\Contracts\BaseSolution; use Spatie\ErrorSolutions\Contracts\HasSolutionsForThrowable; use Spatie\ErrorSolutions\Contracts\Solution; -use Spatie\LaravelIgnition\Exceptions\ViewException as IgnitionViewException; -use Spatie\LaravelFlare\Exceptions\ViewException as FlareViewException; use Spatie\ErrorSolutions\Solutions\Laravel\MakeViewVariableOptionalSolution; use Spatie\ErrorSolutions\Solutions\Laravel\SuggestCorrectVariableNameSolution; +use Spatie\LaravelFlare\Exceptions\ViewException as FlareViewException; +use Spatie\LaravelIgnition\Exceptions\ViewException as IgnitionViewException; use Throwable; class UndefinedViewVariableSolutionProvider implements HasSolutionsForThrowable diff --git a/src/SolutionProviders/Laravel/ViewNotFoundSolutionProvider.php b/src/SolutionProviders/Laravel/ViewNotFoundSolutionProvider.php index aa081ee..8aa167b 100644 --- a/src/SolutionProviders/Laravel/ViewNotFoundSolutionProvider.php +++ b/src/SolutionProviders/Laravel/ViewNotFoundSolutionProvider.php @@ -7,9 +7,9 @@ use InvalidArgumentException; use Spatie\ErrorSolutions\Contracts\BaseSolution; use Spatie\ErrorSolutions\Contracts\HasSolutionsForThrowable; +use Spatie\ErrorSolutions\Support\Laravel\StringComparator; use Spatie\Ignition\Exceptions\ViewException as IgnitionViewException; use Spatie\LaravelFlare\Exceptions\ViewException as FlareViewException; -use Spatie\ErrorSolutions\Support\Laravel\StringComparator; use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\SplFileInfo; use Throwable; diff --git a/src/Support/AiPromptRenderer.php b/src/Support/AiPromptRenderer.php index 335962d..874a4c0 100644 --- a/src/Support/AiPromptRenderer.php +++ b/src/Support/AiPromptRenderer.php @@ -30,4 +30,3 @@ public function renderAsString(array $data, string $viewPath): string return ob_get_clean(); } } - diff --git a/src/Support/Laravel/LivewireComponentParser.php b/src/Support/Laravel/LivewireComponentParser.php index 8965815..fc4979a 100644 --- a/src/Support/Laravel/LivewireComponentParser.php +++ b/src/Support/Laravel/LivewireComponentParser.php @@ -15,7 +15,7 @@ class LivewireComponentParser /** @var class-string */ protected string $componentClass; - /** @var ReflectionClass */ + /** @var ReflectionClass */ protected ReflectionClass $reflectionClass; public static function create(string $componentAlias): self diff --git a/tests/DiscoverSolutionProvidersTest.php b/tests/DiscoverSolutionProvidersTest.php index 54c9a74..c8eb6ca 100644 --- a/tests/DiscoverSolutionProvidersTest.php +++ b/tests/DiscoverSolutionProvidersTest.php @@ -3,7 +3,7 @@ use Spatie\ErrorSolutions\Contracts\HasSolutionsForThrowable; use Spatie\ErrorSolutions\DiscoverSolutionProviders; -it('can get all solution providers', function() { +it('can get all solution providers', function () { $providers = DiscoverSolutionProviders::for(['php', 'laravel']); expect($providers) @@ -11,7 +11,7 @@ ->toImplement(HasSolutionsForThrowable::class); }); -it('will discover more solution providers for more types', function() { +it('will discover more solution providers for more types', function () { $phpProviders = DiscoverSolutionProviders::for(['php']); $laravelProviders = DiscoverSolutionProviders::for(['php', 'laravel']); diff --git a/tests/Solutions/Laravel/MakeViewVariableOptionalSolutionTest.php b/tests/Solutions/Laravel/MakeViewVariableOptionalSolutionTest.php index 83faa5c..f230948 100644 --- a/tests/Solutions/Laravel/MakeViewVariableOptionalSolutionTest.php +++ b/tests/Solutions/Laravel/MakeViewVariableOptionalSolutionTest.php @@ -1,8 +1,8 @@