Skip to content

Commit a1ee4e9

Browse files
lrljoegithub-actions[bot]
authored andcommitted
Fix styling
1 parent 7b0d75c commit a1ee4e9

File tree

4 files changed

+24
-30
lines changed

4 files changed

+24
-30
lines changed

src/Traits/Styling/Configuration/FilterMenuStylingConfiguration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public function setFilterSlidedownWrapperAttributes(array $filterSlidedownWrappe
2626
return $this;
2727
}
2828

29-
3029
/**
3130
* Set a list of attributes to override on the th sort button elements
3231
*/

src/Traits/Styling/HasFilterMenuStyling.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ trait HasFilterMenuStyling
2222
protected array $filterSlidedownWrapperAttributes = ['class' => '', 'default-colors' => true, 'default-styling' => true];
2323

2424
protected ?\Closure $filterSlidedownRowCallback;
25-
2625
}

src/Traits/Styling/Helpers/FilterMenuStylingHelpers.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ public function getFilterSlidedownRowAttributes(string $rowIndex): array
4242
{
4343

4444
if (isset($this->filterSlidedownRowCallback)) {
45-
return array_merge( ['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => (int) $rowIndex], call_user_func($this->filterSlidedownRowCallback, (int) $rowIndex));
45+
return array_merge(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => (int) $rowIndex], call_user_func($this->filterSlidedownRowCallback, (int) $rowIndex));
4646
}
4747

48-
return ['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => (int) $rowIndex];
48+
return ['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => (int) $rowIndex];
4949
}
5050

51-
52-
5351
public function getFilterSlideDownDefaultStatus(): bool
5452
{
5553
return $this->filterSlideDownDefaultVisible;

tests/Unit/Traits/Styling/FilterSlidedownStylingTest.php

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
final class FilterSlidedownStylingTest extends TestCase
88
{
9-
109
public function test_filter_slidedown_wrapper_attributes_returns_default_if_not_set(): void
1110
{
1211
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true], $this->basicTable->getFilterSlidedownWrapperAttributes());
@@ -18,10 +17,10 @@ public function test_filter_slidedown_wrapper_attributes_can_be_changed(): void
1817
$this->basicTable->setFilterSlidedownWrapperAttributes([
1918
'class' => 'text-blue-500',
2019
'default-colors' => true,
21-
'default-styling' => true,
20+
'default-styling' => true,
2221
'x-transition:enter' => 'transition ease-out duration-1000',
2322
]);
24-
23+
2524
$this->assertSame(['class' => 'text-blue-500', 'default-colors' => true, 'default-styling' => true, 'x-transition:enter' => 'transition ease-out duration-1000'], $this->basicTable->getFilterSlidedownWrapperAttributes());
2625

2726
$this->basicTable->setFilterSlidedownWrapperAttributes([
@@ -32,38 +31,37 @@ public function test_filter_slidedown_wrapper_attributes_can_be_changed(): void
3231

3332
}
3433

35-
3634
public function test_filter_slidedown_row_attributes_returns_default_if_not_set(): void
3735
{
3836
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes(1));
3937
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes(2));
40-
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes("1"));
41-
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes("2"));
38+
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes('1'));
39+
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes('2'));
4240
}
4341

4442
public function test_filter_slidedown_row_attributes_can_be_changed(): void
4543
{
4644
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes(1));
4745

48-
$this->basicTable->setFilterSlidedownRowAttributes(fn($rowIndex) => $rowIndex % 2 === 0 ?
46+
$this->basicTable->setFilterSlidedownRowAttributes(fn ($rowIndex) => $rowIndex % 2 === 0 ?
4947
[
5048
'class' => 'bg-red-500',
5149
'default-colors' => true,
52-
'default-styling' => true,
53-
] : [
50+
'default-styling' => true,
51+
] : [
5452
'class' => 'bg-blue-500',
5553
'default-colors' => true,
56-
'default-styling' => true,
57-
]
54+
'default-styling' => true,
55+
]
5856
);
5957
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => true, 'default-styling' => true, 'row' => 0], $this->basicTable->getFilterSlidedownRowAttributes(0));
6058
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes(1));
6159
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => true, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes(2));
6260
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => true, 'row' => 3], $this->basicTable->getFilterSlidedownRowAttributes(3));
63-
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => true, 'default-styling' => true, 'row' => 0], $this->basicTable->getFilterSlidedownRowAttributes("0"));
64-
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes("1"));
65-
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => true, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes("2"));
66-
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => true, 'row' => 3], $this->basicTable->getFilterSlidedownRowAttributes("3"));
61+
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => true, 'default-styling' => true, 'row' => 0], $this->basicTable->getFilterSlidedownRowAttributes('0'));
62+
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes('1'));
63+
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => true, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes('2'));
64+
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => true, 'row' => 3], $this->basicTable->getFilterSlidedownRowAttributes('3'));
6765

6866
}
6967

@@ -72,23 +70,23 @@ public function test_filter_slidedown_row_attributes_can_be_changed_and_sets_def
7270
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 0], $this->basicTable->getFilterSlidedownRowAttributes(0));
7371
$this->assertSame(['class' => '', 'default-colors' => true, 'default-styling' => true, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes(1));
7472

75-
$this->basicTable->setFilterSlidedownRowAttributes(fn($rowIndex) => $rowIndex % 2 === 0 ?
73+
$this->basicTable->setFilterSlidedownRowAttributes(fn ($rowIndex) => $rowIndex % 2 === 0 ?
7674
[
7775
'class' => 'bg-red-500',
7876
'default-colors' => false,
79-
] : [
77+
] : [
8078
'class' => 'bg-blue-500',
81-
'default-styling' => false,
82-
]
79+
'default-styling' => false,
80+
]
8381
);
8482
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => false, 'default-styling' => true, 'row' => 0], $this->basicTable->getFilterSlidedownRowAttributes(0));
8583
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => false, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes(1));
8684
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => false, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes(2));
8785
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => false, 'row' => 3], $this->basicTable->getFilterSlidedownRowAttributes(3));
88-
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => false, 'default-styling' => true, 'row' => 0], $this->basicTable->getFilterSlidedownRowAttributes("0"));
89-
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => false, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes("1"));
90-
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => false, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes("2"));
91-
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => false, 'row' => 3], $this->basicTable->getFilterSlidedownRowAttributes("3"));
86+
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => false, 'default-styling' => true, 'row' => 0], $this->basicTable->getFilterSlidedownRowAttributes('0'));
87+
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => false, 'row' => 1], $this->basicTable->getFilterSlidedownRowAttributes('1'));
88+
$this->assertSame(['class' => 'bg-red-500', 'default-colors' => false, 'default-styling' => true, 'row' => 2], $this->basicTable->getFilterSlidedownRowAttributes('2'));
89+
$this->assertSame(['class' => 'bg-blue-500', 'default-colors' => true, 'default-styling' => false, 'row' => 3], $this->basicTable->getFilterSlidedownRowAttributes('3'));
9290

9391
}
94-
}
92+
}

0 commit comments

Comments
 (0)