Skip to content

Commit 404830d

Browse files
lee-togithub-actions[bot]
authored andcommitted
[rector] Rector fixes
1 parent 8b45a98 commit 404830d

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

src/Laravel/src/Commands/PublishCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private function publishAssetsTemplate(): void
8181
if (confirm('Install modules automatically? (tailwindcss, autoprefixer, postcss)')) {
8282
$this->flushNodeModules();
8383

84-
self::updateNodePackages(static fn ($packages) => [
84+
self::updateNodePackages(static fn ($packages): array => [
8585
'@tailwindcss/typography' => '^0.5',
8686
'@tailwindcss/line-clamp' => '^0.4',
8787
'@tailwindcss/aspect-ratio' => '^0.4',

src/Laravel/src/DependencyInjection/MoonShineConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function logo(string|Closure $logo, bool $small = false): self
9191
public function getLocales(): array
9292
{
9393
return Collection::make($this->get('locales', []))
94-
->mapWithKeys(fn ($value, $key) => [is_numeric($key) ? $value : $key => $value])
94+
->mapWithKeys(fn ($value, $key): array => [is_numeric($key) ? $value : $key => $value])
9595
->toArray();
9696
}
9797

src/Support/src/DTOs/Select/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function fromArray(array $values): self
7979
*/
8080
public function toArray(): array
8181
{
82-
return array_filter($this->values, fn($v) => ! is_null($v));
82+
return array_filter($this->values, fn($v): bool => ! is_null($v));
8383
}
8484

8585
public function set(string $name, mixed $value): self

src/Support/src/Memoize/MemoizeRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class MemoizeRepository implements Countable, StatefulContract
2121

2222
public static function getInstance(): static
2323
{
24-
return static::$cache ??= new self();
24+
return self::$cache ??= new self();
2525
}
2626

2727
protected function __construct()

src/UI/src/Components/Tabs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function viewData(): array
113113
return [
114114
'tabs' => $tabs
115115
->filter(fn (Tab $tab): bool => $tab->isSee())
116-
->mapWithKeys(fn (Tab $tab) => [$tab->getId() => $tab->toArray()])
116+
->mapWithKeys(fn (Tab $tab): array => [$tab->getId() => $tab->toArray()])
117117
->toArray(),
118118
'active' => $this->getActive(),
119119
'justifyAlign' => $this->getJustifyAlign(),

src/UI/src/Fields/Json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ public function getReactiveValue(): mixed
736736

737737
return $this->toValue() ?? $this->getPreparedFields()
738738
->onlyFields()
739-
->mapWithKeys(fn (FieldContract $field) => [$field->getColumn() => null]);
739+
->mapWithKeys(fn (FieldContract $field): array => [$field->getColumn() => null]);
740740
}
741741

742742
/**

src/UI/src/Fields/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getReactiveValue(): mixed
6565
return filled($value) ? $value : $this
6666
->getPreparedFields()
6767
->onlyFields()
68-
->mapWithKeys(fn (FieldContract $field) => [$field->getColumn() => null]);
68+
->mapWithKeys(fn (FieldContract $field): array => [$field->getColumn() => null]);
6969
}
7070

7171
public function render(): string

src/UI/src/Traits/Fields/ShowWhen.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getShowWhenCondition(): array
6262
*/
6363
public function modifyShowFieldName(string $name): static
6464
{
65-
$this->showWhenCondition = array_map(function (array $item) use ($name) {
65+
$this->showWhenCondition = array_map(function (array $item) use ($name): array {
6666
$item['showField'] = $name;
6767

6868
return $item;
@@ -77,7 +77,7 @@ public function modifyShowFieldRangeName(): static
7777
return $this;
7878
}
7979

80-
$this->showWhenCondition = array_map(function (array $item) {
80+
$this->showWhenCondition = array_map(function (array $item): array {
8181
$item['showField'] = $item['range_type'] === 'from'
8282
? $this->getNameAttribute($this->getFromField())
8383
: $this->getNameAttribute($this->getToField());

0 commit comments

Comments
 (0)