Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.x' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Jan 7, 2023
2 parents fe7f4cb + 3db42cb commit 5883a21
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Decorations/Tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function tabs(): Collection
{
return tap(Collection::make($this->tabs), function (Collection $tabs) {
throw_if(
$tabs->every(fn($tab) => !$tab instanceof Tab),
$tabs->every(fn ($tab) => ! $tab instanceof Tab),
new DecorationException('Tabs must be a class of '.Tab::class)
);
});
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/MoonShineUserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public function fields(): array
PasswordRepeat::make(trans('moonshine::ui.resource.repeat_password'), 'password_repeat')
->customAttributes(['autocomplete' => 'confirm-password'])
->hideOnIndex(),
])
])
]),
]),
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/MoonShineUserRoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function fields(): array
ID::make()->sortable()->showOnExport(),
Text::make(trans('moonshine::ui.resource.role_name'), 'name')
->required()->showOnExport(),
])
]),
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Resources/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ public function formComponents(): Collection
public function relatableFormComponents(): Collection
{
return $this->getFields()
->filter(fn(Field $field) => $field->isResourceModeField())
->map(fn(Field $field) => $field->setParents())
->filter(fn (Field $field) => $field->isResourceModeField())
->map(fn (Field $field) => $field->setParents())
;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Decorations/TabsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TabsTest extends TestCase
public function test_tab_get_view(): void
{
$decoration = Tabs::make([
Tab::make('Tab')
Tab::make('Tab'),
]);

$this->assertEquals('moonshine::decorations.tabs', $decoration->getView());
Expand Down

0 comments on commit 5883a21

Please sign in to comment.