From 553c9e9fd60097306830dc4edab96cdc59960d46 Mon Sep 17 00:00:00 2001 From: Ben Dauphinee Date: Mon, 23 Dec 2024 09:09:57 -0400 Subject: [PATCH 1/2] Add some type hinting to fix a warning about implicitly marking parameter --- src/BladeRouteGenerator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BladeRouteGenerator.php b/src/BladeRouteGenerator.php index 9a9bc703..8f9f43c3 100644 --- a/src/BladeRouteGenerator.php +++ b/src/BladeRouteGenerator.php @@ -9,7 +9,7 @@ class BladeRouteGenerator { public static $generated; - public function generate($group = null, ?string $nonce = null): string + public function generate(?array $group = null, ?string $nonce = null): string { $ziggy = new Ziggy($group); @@ -28,10 +28,10 @@ public function generate($group = null, ?string $nonce = null): string return (string) new $output($ziggy, $routeFunction, $nonce); } - private function generateMergeJavascript(Ziggy $ziggy, string $nonce) + private function generateMergeJavascript(Ziggy $ziggy, string $nonce): string { $output = config('ziggy.output.merge_script', MergeScript::class); - +dd($output); return new $output($ziggy, $nonce); } } From aba7f1995f000591041164ed4b6f4ac74e43ec38 Mon Sep 17 00:00:00 2001 From: Ben Dauphinee Date: Fri, 27 Dec 2024 14:20:13 -0400 Subject: [PATCH 2/2] Remove debug code Because of course I forgot to lol. --- src/BladeRouteGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BladeRouteGenerator.php b/src/BladeRouteGenerator.php index 8f9f43c3..0b66c345 100644 --- a/src/BladeRouteGenerator.php +++ b/src/BladeRouteGenerator.php @@ -31,7 +31,7 @@ public function generate(?array $group = null, ?string $nonce = null): string private function generateMergeJavascript(Ziggy $ziggy, string $nonce): string { $output = config('ziggy.output.merge_script', MergeScript::class); -dd($output); + return new $output($ziggy, $nonce); } }