Skip to content

Commit bc48d42

Browse files
tabacituStyleCIBot
authored andcommitted
Apply fixes from StyleCI
[ci skip] [skip ci]
1 parent 5caee1d commit bc48d42

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/app/Library/CrudPanel/Traits/Buttons.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@ public function orderButtons(string $stack, array $order)
2525

2626
// we get the buttons that belong to the specified stack
2727
$stackButtons = $this->buttons()->reject(function ($item) use ($stack, $otherButtons) {
28-
if($item->stack != $stack) {
28+
if ($item->stack != $stack) {
2929
// if the button does not belong to this stack we just add it for merging later
3030
$otherButtons->push($item);
31+
3132
return true;
3233
}
34+
3335
return false;
3436
});
3537

3638
// we parse the ordered buttons
3739
collect($order)->each(function ($btnKey) use ($newButtons, $stackButtons) {
38-
if (!$button = $stackButtons->where('name', $btnKey)->first()) {
39-
abort(500, 'Button name [«' . $btnKey . '»] not found.');
40+
if (! $button = $stackButtons->where('name', $btnKey)->first()) {
41+
abort(500, 'Button name [«'.$btnKey.'»] not found.');
4042
}
4143
$newButtons->push($button);
4244
});
@@ -45,7 +47,7 @@ public function orderButtons(string $stack, array $order)
4547
// we add the remaining buttons to the end of the ordered ones
4648
if (count($newButtons) < count($stackButtons)) {
4749
foreach ($stackButtons as $button) {
48-
if (!$newButtons->where('name', $button->name)->first()) {
50+
if (! $newButtons->where('name', $button->name)->first()) {
4951
$newButtons->push($button);
5052
}
5153
}

0 commit comments

Comments
 (0)