From 2cb65aeb78576e42327ca3a835c26eee2c6129a2 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 9 Oct 2024 11:13:02 +0800 Subject: [PATCH] [11.x] Fixes parameter declaration for `ServiceProvider::optimizes()` ``` Illuminate\Support\ServiceProvider::optimizes(): Implicitly marking parameter $optimize as nullable is deprecated, the explicit nullable type must be used instead Illuminate\Support\ServiceProvider::optimizes(): Implicitly marking parameter $clear as nullable is deprecated, the explicit nullable type must be used instead ``` Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Support/ServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Support/ServiceProvider.php b/src/Illuminate/Support/ServiceProvider.php index 3edda126ed2a..466ece11c004 100755 --- a/src/Illuminate/Support/ServiceProvider.php +++ b/src/Illuminate/Support/ServiceProvider.php @@ -477,12 +477,12 @@ public function commands($commands) /** * Register commands that should run on "optimize" or "optimize:clear". * - * @param string $optimize - * @param string $clear + * @param string|null $optimize + * @param string|null $clear * @param string|null $key * @return void */ - protected function optimizes(string $optimize = null, string $clear = null, ?string $key = null) + protected function optimizes(?string $optimize = null, ?string $clear = null, ?string $key = null) { $key ??= (string) Str::of(get_class($this)) ->classBasename()