diff --git a/src/Components/SqlComponent.php b/src/Components/SqlComponent.php index 8670975..fc968ca 100644 --- a/src/Components/SqlComponent.php +++ b/src/Components/SqlComponent.php @@ -29,7 +29,7 @@ public function render(): Closure } /** - * @param ComponentAttributeBag $attributes + * @param ComponentAttributeBag $attributes */ private function format(Htmlable $slot, ComponentAttributeBag $attributes): string { @@ -42,17 +42,17 @@ private function format(Htmlable $slot, ComponentAttributeBag $attributes): stri } /** - * @param ComponentAttributeBag $attributes + * @param ComponentAttributeBag $attributes */ private function highlighter(ComponentAttributeBag $attributes): Highlighter { return $this->highlight ? app(Highlighter::class, ['htmlAttributes' => $this->formatAttributes($attributes)]) - : new NullHighlighter(); + : new NullHighlighter; } /** - * @param ComponentAttributeBag $attributes + * @param ComponentAttributeBag $attributes * @return array */ private function formatAttributes(ComponentAttributeBag $attributes): array diff --git a/tests/SqlComponentTest.php b/tests/SqlComponentTest.php index 2d06690..0271f2a 100644 --- a/tests/SqlComponentTest.php +++ b/tests/SqlComponentTest.php @@ -18,7 +18,7 @@ $sql = "select * from `users` where `email` = 'info@example.com'"; $blade = test()->blade('{!! $sql !!}', ['sql' => $sql]); - $formatted = (new SqlFormatter(new NullHighlighter()))->format($sql); + $formatted = (new SqlFormatter(new NullHighlighter))->format($sql); expect((string) $blade)->toBe($formatted); }); @@ -36,7 +36,7 @@ $sql = "select * from `users` where `email` = 'info@example.com'"; $blade = test()->blade(sprintf('%s', $sql)); - $plain = (new SqlFormatter(new NullHighlighter()))->highlight($sql); + $plain = (new SqlFormatter(new NullHighlighter))->highlight($sql); expect((string) $blade)->toBe($plain); });