Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 23, 2023
1 parent 4f1bf1f commit 6d2c5e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/Column/ActionColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class ActionColumn implements ColumnInterface
{

private Closure|null $urlCreator = null;
private CurrentRoute $currentRoute;
private UrlGeneratorInterface|null $urlGenerator = null;
Expand Down
2 changes: 0 additions & 2 deletions src/Column/ActionColumnRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Closure;
use InvalidArgumentException;
use Yiisoft\Data\Reader\ReadableDataInterface;
use Yiisoft\Html\Html;
use Yiisoft\Router\CurrentRoute;
use Yiisoft\Router\UrlGeneratorInterface;
Expand Down Expand Up @@ -154,7 +153,6 @@ private function getDefaultButtons(): array
'update' => static fn(string $url): string => Html::a(
Html::span(''),
$url,

[
'name' => 'update',
'role' => 'button',
Expand Down
12 changes: 6 additions & 6 deletions src/Column/Base/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class Cell
private bool $doubleEncode = true;

/**
* @param string|Stringable|callable $content
* @param callable|string|Stringable $content
*/
public function __construct(
private array $attributes = [],
Expand All @@ -29,7 +29,7 @@ public function __construct(
* - `false`: nothing is encoded.
* Defaults to `null`.
*/
final public function encode(?bool $encode): self
public function encode(?bool $encode): self
{
$new = clone $this;
$new->encode = $encode;
Expand All @@ -48,7 +48,7 @@ public function doubleEncode(bool $doubleEncode): self
}

/**
* @param string|Stringable|callable $content Tag content.
* @param callable|string|Stringable $content Tag content.
*/
public function content(string|Stringable|callable $content): self
{
Expand All @@ -63,7 +63,7 @@ public function content(string|Stringable|callable $content): self
*
* @param array $attributes Name-value set of attributes.
*/
final public function addAttributes(array $attributes): self
public function addAttributes(array $attributes): self
{
$new = clone $this;
$new->attributes = array_merge($new->attributes, $attributes);
Expand All @@ -75,7 +75,7 @@ final public function addAttributes(array $attributes): self
*
* @param array $attributes Name-value set of attributes.
*/
final public function attributes(array $attributes): self
public function attributes(array $attributes): self
{
$new = clone $this;
$new->attributes = $attributes;
Expand All @@ -88,7 +88,7 @@ final public function attributes(array $attributes): self
* @param string $name Name of the attribute.
* @param mixed $value Value of the attribute.
*/
final public function attribute(string $name, mixed $value): self
public function attribute(string $name, mixed $value): self
{
$new = clone $this;
$new->attributes[$name] = $value;
Expand Down
5 changes: 2 additions & 3 deletions src/Column/DataColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ public function isVisible(): bool
return $this->visible;
}


/**
* Return new instance with the filter input select items.
*
Expand Down Expand Up @@ -266,7 +265,7 @@ protected function renderDataCellContent(object|array $data, mixed $key, int $in
return $this->getDataCellValue($data, $key, $index);
}

private function renderFilterInput(DataColumn $column, GlobalContext $context): string
private function renderFilterInput(self $column, GlobalContext $context): string
{
$filterInputAttributes = $column->getFilterInputAttributes();
$filterInputTag = Input::tag();
Expand All @@ -290,7 +289,7 @@ private function renderFilterInput(DataColumn $column, GlobalContext $context):
->render();
}

private function renderFilterSelect(DataColumn $column, GlobalContext $context): string
private function renderFilterSelect(self $column, GlobalContext $context): string
{
$filterInputAttributes = $column->getFilterInputAttributes();
$filterSelectTag = Select::tag();
Expand Down

0 comments on commit 6d2c5e0

Please sign in to comment.