diff --git a/src/ArrMixin.php b/src/ArrMixin.php index 8bb434c..63e37f2 100644 --- a/src/ArrMixin.php +++ b/src/ArrMixin.php @@ -108,12 +108,10 @@ public static function sortDesc() /** * Recursively sort an array by keys and values in descending order. - * - * @return array */ public function sortRecursiveDesc() { - return fn ($array, $options = SORT_REGULAR) => $this->sortRecursive($array, $options, true); + return fn ($array, $options = SORT_REGULAR) => $this->sortRecursive($array); // , $options, true } public function undot() diff --git a/src/CollectionMixin.php b/src/CollectionMixin.php index 37dfcc3..9b7d92c 100644 --- a/src/CollectionMixin.php +++ b/src/CollectionMixin.php @@ -172,7 +172,7 @@ public function sortKeysUsing() public function undot() { - return fn () => new Collection(Arr::undot($this->all())); + return fn () => new Collection(Arr::undot($this->all())); /* @phpstan-ignore-line */ } public function value() @@ -198,11 +198,11 @@ public function whenNotEmpty() public function unlessEmpty() { - return fn (callable $callback, callable $default = null) => $this->whenNotEmpty($callback, $default); + return fn (callable $callback, callable $default = null) => $this->whenNotEmpty($callback, $default); /* @phpstan-ignore-line */ } public function unlessNotEmpty() { - return fn (callable $callback, callable $default = null) => $this->whenEmpty($callback, $default); + return fn (callable $callback, callable $default = null) => $this->whenEmpty($callback, $default); /* @phpstan-ignore-line */ } } diff --git a/src/RequestMixin.php b/src/RequestMixin.php index 57b8d1c..7b69f8b 100644 --- a/src/RequestMixin.php +++ b/src/RequestMixin.php @@ -119,7 +119,7 @@ public function filled() $keys = is_array($key) ? $key : func_get_args(); foreach ($keys as $value) { - if ($this->isEmptyString($value)) { + if ($this->isEmptyString($value)) { /* @phpstan-ignore-line */ return false; } } @@ -221,7 +221,7 @@ public function isNotFilled() $keys = is_array($key) ? $key : func_get_args(); foreach ($keys as $value) { - if (! $this->isEmptyString($value)) { + if (! $this->isEmptyString($value)) { /* @phpstan-ignore-line */ return false; } } @@ -247,7 +247,7 @@ public function merge() public function mergeIfMissing() { - return fn (array $input) => $this->merge( + return fn (array $input) => $this->merge( /* @phpstan-ignore-line */ collect($input) ->filter(fn ($value, $key) => $this->missing($key)) ->toArray() @@ -301,9 +301,9 @@ public function string() public function wantsJson() { return function () { - $acceptable = explode(',', $this->header('ACCEPT') ?? ''); + $acceptable = explode(',', $this->header('ACCEPT')); - return Str::contains(strtolower($acceptable[0]) ?? '', ['/json', '+json']); + return Str::contains(strtolower($acceptable[0]), ['/json', '+json']); }; }