From e637b2e2d64244bb0ca89f2aa483f6b48cf5e23f Mon Sep 17 00:00:00 2001 From: Brandon Date: Tue, 18 Jun 2024 16:38:49 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20potential=20duplicate=20na?= =?UTF-8?q?mespaces=20when=20event=20stub=20contains=20optional=20params?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Console/Commands/EventMakeCommand.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Console/Commands/EventMakeCommand.php b/src/Console/Commands/EventMakeCommand.php index f567715..4679871 100644 --- a/src/Console/Commands/EventMakeCommand.php +++ b/src/Console/Commands/EventMakeCommand.php @@ -86,6 +86,7 @@ protected function replaceClass($stub, $name) $namespaces = collect($attributes) ->filter(fn ($namespace) => Str::contains($namespace, '\\')) + ->map(fn ($namespace) => str_replace('?', '', $namespace)) ->unique() ->map(fn ($namespace) => "use {$namespace};") ->implode("\n");