From f3dcb71d1724615a99336ee496a757e865042a14 Mon Sep 17 00:00:00 2001 From: rhiannonjourney Date: Tue, 27 Feb 2024 18:10:46 +0000 Subject: [PATCH] Fix styling --- src/Forms/Components/ResourcePicker.php | 2 +- src/Support/ResourcePickerConfiguration.php | 2 +- src/Support/ResourcePickerManager.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Forms/Components/ResourcePicker.php b/src/Forms/Components/ResourcePicker.php index 474baae..528e6a4 100644 --- a/src/Forms/Components/ResourcePicker.php +++ b/src/Forms/Components/ResourcePicker.php @@ -89,7 +89,7 @@ public function sortable(bool | Closure $sortable = true): static return $this; } - public function relationship(string | Closure $name = null, Closure $modifyQueryUsing = null): static + public function relationship(string | Closure | null $name = null, ?Closure $modifyQueryUsing = null): static { $this->relationship = $name ?? $this->getName(); diff --git a/src/Support/ResourcePickerConfiguration.php b/src/Support/ResourcePickerConfiguration.php index 44bcdef..04d0aa6 100644 --- a/src/Support/ResourcePickerConfiguration.php +++ b/src/Support/ResourcePickerConfiguration.php @@ -18,7 +18,7 @@ protected function __construct(public readonly string $resource, public readonly { } - public static function make(string $resource, string $identifier = null): static + public static function make(string $resource, ?string $identifier = null): static { return new static($resource, $identifier ?? $resource); } diff --git a/src/Support/ResourcePickerManager.php b/src/Support/ResourcePickerManager.php index c4318bc..3db912e 100644 --- a/src/Support/ResourcePickerManager.php +++ b/src/Support/ResourcePickerManager.php @@ -34,7 +34,7 @@ public function getResources(): array return $this->resources; } - public function configure(array | string $configurations, Closure $callback = null): static + public function configure(array | string $configurations, ?Closure $callback = null): static { if (! is_array($configurations)) { throw_if(