Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored and github-actions[bot] committed Dec 26, 2024
1 parent bd1599e commit 149ca4b
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 29 deletions.
2 changes: 0 additions & 2 deletions src/Traits/Configuration/ComponentConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

trait ComponentConfiguration
{

/**
* Set the empty message
*/
Expand Down Expand Up @@ -43,7 +42,6 @@ public function setDataTableFingerprint(string $dataTableFingerprint): self
return $this;
}


public function useComputedPropertiesEnabled(): self
{
$this->useComputedProperties = true;
Expand Down
8 changes: 3 additions & 5 deletions src/Traits/Configuration/QueryConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

trait QueryConfiguration
{

public function setBuilder(Builder $builder): void
{
$this->builder = $builder;
Expand Down Expand Up @@ -45,7 +44,7 @@ public function addAdditionalSelects(string|array $selects): self

return $this;
}

public function setExtraWiths(array $extraWiths): self
{
$this->extraWiths = $extraWiths;
Expand Down Expand Up @@ -101,7 +100,7 @@ public function addExtraWithAvg(string $relationship, string $column): self

return $this;
}

public function setEagerLoadAllRelationsStatus(bool $status): self
{
$this->eagerLoadAllRelationsStatus = $status;
Expand All @@ -122,5 +121,4 @@ public function setEagerLoadAllRelationsDisabled(): self

return $this;
}

}
}
5 changes: 2 additions & 3 deletions src/Traits/Configuration/QueryStringConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function setupQueryStringStatus(): void
}
}
}

public function setQueryStringStatus(bool $status): self
{
$this->queryStringStatus = $status;
Expand Down Expand Up @@ -59,5 +59,4 @@ protected function setQueryStringConfigAlias(string $type, string $alias): self
{
return $this->setQueryStringConfig($type, ['alias' => $alias]);
}

}
}
1 change: 0 additions & 1 deletion src/Traits/Helpers/ComponentHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function isTableNamed(string $name): bool
return $this->tableName === $name;
}


public function getComputedPropertiesStatus(): bool
{
return $this->useComputedProperties ?? false;
Expand Down
3 changes: 1 addition & 2 deletions src/Traits/Helpers/QueryHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

trait QueryHelpers
{

public function getBuilder(): Builder
{
return $this->builder;
Expand Down Expand Up @@ -97,4 +96,4 @@ public function eagerLoadAllRelationsIsDisabled(): bool
{
return $this->getEagerLoadAllRelationsStatus() === false;
}
}
}
1 change: 0 additions & 1 deletion src/Traits/Helpers/QueryStringHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ protected function getQueryStringConfigAlias(string $type): string
{
return $this->getQueryStringConfig($type)['alias'] ?? $this->getQueryStringAlias().'-'.$type;
}

}
2 changes: 1 addition & 1 deletion src/Traits/WithColumnSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Livewire\Attributes\Locked;
use Rappasoft\LaravelLivewireTables\Events\ColumnsSelected;
use Rappasoft\LaravelLivewireTables\Traits\Configuration\ColumnSelectConfiguration;
use Rappasoft\LaravelLivewireTables\Traits\Helpers\ColumnSelectHelpers;
use Rappasoft\LaravelLivewireTables\Traits\Core\QueryStrings\HasQueryStringForColumnSelect;
use Rappasoft\LaravelLivewireTables\Traits\Helpers\ColumnSelectHelpers;

trait WithColumnSelect
{
Expand Down
7 changes: 3 additions & 4 deletions src/Traits/WithQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
trait WithQuery
{
use QueryConfiguration,
QueryHelpers;
QueryHelpers;

protected Builder $builder;

protected ?string $primaryKey;
Expand All @@ -28,5 +28,4 @@ trait WithQuery
protected array $extraWithAvgs = [];

protected bool $eagerLoadAllRelationsStatus = false;

}
}
4 changes: 2 additions & 2 deletions src/Traits/WithQueryString.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ trait WithQueryString
{
use QueryStringConfiguration,
QueryStringHelpers;

#[Locked]
public array $queryStringConfig = [
'columns' => ['status' => false, 'alias' => null],
'filter' => ['status' => false, 'alias' => null],
'search' => ['status' => true, 'alias' => null],
'sorts' => ['status' => true, 'alias' => null],
];

#[Locked]
public ?bool $queryStringStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,4 @@ public function test_can_change_default_column_select_query_string_alias(): void
$this->assertSame('selected-columns', parent::$mock->getQueryStringAliasForColumnSelect());
$this->assertTrue(parent::$mock->hasQueryStringAliasForColumnSelect());
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function test_can_disable_sort_query_string_status(): void
parent::$mock->boot();
parent::$mock->setQueryStringForSortDisabled();


$this->assertSame(false, parent::$mock->getQueryStringStatusForSort());
}

Expand All @@ -39,7 +38,6 @@ public function test_can_enable_sort_query_string_status(): void
parent::$mock->boot();
parent::$mock->setQueryStringForSortDisabled();


$this->assertSame(false, parent::$mock->getQueryStringStatusForSort());
parent::$mock->setQueryStringForSortEnabled();
$this->assertSame(true, parent::$mock->getQueryStringStatusForSort());
Expand All @@ -62,7 +60,6 @@ public function test_can_change_default_sort_query_string_alias(): void
parent::$mock->boot();
parent::$mock->setQueryStringForSortDisabled();


$this->assertSame('table-sorts', parent::$mock->getQueryStringAliasForSort());
parent::$mock->setQueryStringAliasForSort('pet-sorts');
$this->assertSame('pet-sorts', parent::$mock->getQueryStringAliasForSort());
Expand Down
3 changes: 1 addition & 2 deletions tests/Unit/Traits/Core/QueryStrings/QueryStringTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ public function configure(): void
}
};
}

}
}

0 comments on commit 149ca4b

Please sign in to comment.