Skip to content

Commit

Permalink
fixed type param
Browse files Browse the repository at this point in the history
  • Loading branch information
ken lin committed Feb 16, 2023
1 parent 83461f7 commit 94fc176
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Traits/Deletable.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function delete(string $primaryKey): void
*
* @param $id
*/
public function confirmDeletion($id)
public function confirmDeletion($id): void
{
$this->itemKey = $id;

Expand Down
6 changes: 4 additions & 2 deletions src/Traits/NewResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Luckykenlin\LivewireTables\Traits;

use Illuminate\Http\RedirectResponse;

trait NewResource
{
/**
Expand All @@ -10,11 +12,11 @@ trait NewResource
public string $newResource = '';

/**
* @return \Illuminate\Http\RedirectResponse|void
* @return RedirectResponse|void
*/
public function resolveNewResource()
{
if (! $this->hasNewResource()) {
if (!$this->hasNewResource()) {
return;
}

Expand Down
8 changes: 4 additions & 4 deletions src/Traits/Pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ trait Pagination
/**
* Theme of pagination.
*/
public $paginationTheme;
public string $paginationTheme;

/**
* Amount of items to show per page.
*/
public $perPage;
public int $perPage;

/**
* The options to limit the amount of results per page.
*/
public $perPageOptions;
public array $perPageOptions;

/**
* Show the per page select.
Expand All @@ -47,7 +47,7 @@ trait Pagination
/**
* Initialize
*/
protected function initializePagination()
protected function initializePagination(): void
{
$this->paginationTheme = $this->paginationTheme ?? config('livewire-tables.tailwind', 'tailwind');

Expand Down

0 comments on commit 94fc176

Please sign in to comment.