Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dtvmedia committed Mar 22, 2024
1 parent 04ac7e4 commit a0543dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/Livewire/ArrayDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ protected function applySearch($builderOrData)

return $show;
});

}

return $builderOrData;
Expand Down
28 changes: 14 additions & 14 deletions src/Livewire/BaseDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function __construct($id = null)
* @return View
* @throws Exception
*/
public abstract function render();
abstract public function render();

/**
* Sets the selected scopes
Expand All @@ -196,7 +196,7 @@ public abstract function render();
* @return Builder|Collection
* @throws Exception Scope not found in model
*/
protected abstract function applyScopes($builderOrData);
abstract protected function applyScopes($builderOrData);

/**
* Sets the where's for selected search
Expand All @@ -205,7 +205,7 @@ protected abstract function applyScopes($builderOrData);
*
* @return Builder|Collection
*/
protected abstract function applySearch($builderOrData);
abstract protected function applySearch($builderOrData);

/**
* Setts the orderBy for selected column
Expand All @@ -214,7 +214,7 @@ protected abstract function applySearch($builderOrData);
*
* @return Builder|Collection
*/
protected abstract function applySort($builderOrData);
abstract protected function applySort($builderOrData);

/**
* Sets the limit and the offset
Expand All @@ -223,7 +223,7 @@ protected abstract function applySort($builderOrData);
*
* @return Builder|LengthAwarePaginator
*/
protected abstract function applyPagination($builderOrData);
abstract protected function applyPagination($builderOrData);


/**
Expand Down Expand Up @@ -363,9 +363,9 @@ protected function writeSessionMetaData(): void
/**
* Read recent table meta data from session
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @return bool
* @throws NotFoundExceptionInterface
* @throws ContainerExceptionInterface
*/
protected function readSessionMetaData(): bool
{
Expand All @@ -374,11 +374,11 @@ protected function readSessionMetaData(): bool
}

$meta = session()->get($this->getSessionMetaDataKey());
$this->paginate = $meta[ 'paginate' ];
$this->sort = $meta[ 'sort' ];
$this->sortDirection = $meta[ 'sortDirection' ];
$this->simpleScope = $meta[ 'simpleScope' ];
$this->search = $meta[ 'search' ];
$this->paginate = $meta['paginate'];
$this->sort = $meta['sort'];
$this->sortDirection = $meta['sortDirection'];
$this->simpleScope = $meta['simpleScope'];
$this->search = $meta['search'];

return true;
}
Expand Down Expand Up @@ -425,7 +425,7 @@ protected function addColumn(array|Closure|string $values, string $label = null)
$column = new $this->columnClass($values, $label);
$column->checkForAutoDisableSortAndSearch($this->resultModel ?? null);

$this->columns[ $column->getId() ] = $column;
$this->columns[$column->getId()] = $column;

return $column;
}
Expand Down Expand Up @@ -456,7 +456,7 @@ protected function addSimpleScope(string $scope, string $label = null)

$simpleScope = new $this->simpleScopeClass($scope, $label);

$this->simpleScopes[ $simpleScope->getId() ] = $simpleScope;
$this->simpleScopes[$simpleScope->getId()] = $simpleScope;

return $simpleScope;
}
Expand Down

0 comments on commit a0543dd

Please sign in to comment.