Skip to content

Commit f7d0b59

Browse files
lrljoegithub-actions[bot]
authored andcommitted
Fix styling
1 parent 5c4b2a9 commit f7d0b59

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

src/Views/Columns/LivewireComponentColumn.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ class LivewireComponentColumn extends Column
1717
LivewireComponentColumnHelpers;
1818

1919
protected ?string $livewireComponent;
20-
2120
}

src/Views/Traits/Configuration/LivewireComponentColumnConfiguration.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66

77
trait LivewireComponentColumnConfiguration
88
{
9-
109
public function component(string $livewireComponent): self
1110
{
1211
$this->livewireComponent = (Str::startsWith($livewireComponent, 'livewire:')) ? substr($livewireComponent, 9) : $livewireComponent;
1312

1413
return $this;
1514
}
16-
1715
}

src/Views/Traits/Helpers/LivewireComponentColumnHelpers.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ public function hasLivewireComponent(): bool
2525
{
2626
return isset($this->livewireComponent);
2727
}
28-
28+
2929
public function getContents(Model $row): null|string|HtmlString|DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
3030
{
31-
if(!$this->hasLivewireComponent())
32-
{
31+
if (! $this->hasLivewireComponent()) {
3332
throw new DataTableConfigurationException('You must define a Livewire Component for this column');
3433
}
3534

@@ -61,5 +60,4 @@ public function getContents(Model $row): null|string|HtmlString|DataTableConfigu
6160
));
6261

6362
}
64-
6563
}

tests/Unit/Views/Columns/LivewireComponentColumnTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Rappasoft\LaravelLivewireTables\Exceptions\DataTableConfigurationException;
66
use Rappasoft\LaravelLivewireTables\Tests\Models\Pet;
77
use Rappasoft\LaravelLivewireTables\Tests\TestCase;
8-
use Rappasoft\LaravelLivewireTables\Views\Columns\LivewireComponentColumn ;
8+
use Rappasoft\LaravelLivewireTables\Views\Columns\LivewireComponentColumn;
99

1010
final class LivewireComponentColumnTest extends TestCase
1111
{
@@ -43,7 +43,7 @@ public function test_can_get_livewire_component(): void
4343
$column->component('test-component');
4444

4545
$this->assertTrue($column->hasLivewireComponent());
46-
$this->assertSame('test-component',$column->getLivewireComponent());
46+
$this->assertSame('test-component', $column->getLivewireComponent());
4747
}
4848

4949
public function test_can_not_avoid_defining_livewire_component(): void
@@ -58,10 +58,8 @@ public function test_attributes_should_return_array(): void
5858
{
5959
$this->expectException(DataTableConfigurationException::class);
6060

61-
$column = LivewireComponentColumn::make('Total Users')->attributes(fn ($value, $row, Column $column) => 'test');
61+
$column = LivewireComponentColumn::make('Total Users')->attributes(fn ($value, $row, Column $column) => 'test');
6262

6363
$column->getContents(Pet::find(1));
6464
}
65-
66-
67-
}
65+
}

0 commit comments

Comments
 (0)