Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilvestre committed Oct 22, 2024
1 parent 8d8f7d0 commit 2759ae2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Bundle/Grid/AbstractGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class AbstractGrid implements GridInterface
{
public static function getName(): string
{
if ($attribute = static::getAttributes()) {
if ($attribute = self::getAttributes()) {
return $attribute[0]->newInstance()->name;
}

Expand All @@ -30,7 +30,7 @@ public static function getName(): string

public function getResourceClass(): string
{
if ($attribute = $this->getAttributes()) {
if ($attribute = self::getAttributes()) {
return $attribute[0]->newInstance()->resourceClass;
}

Expand All @@ -52,15 +52,15 @@ public function toArray(): array

private function createGridBuilder(): GridBuilderInterface
{
if ($this instanceof ResourceAwareGridInterface || $this->getAttributes() !== []) {
if ($this instanceof ResourceAwareGridInterface || $this::getAttributes() !== []) {
return GridBuilder::create($this::getName(), $this->getResourceClass());
}

return GridBuilder::create($this::getName());
}

/**
* @return \ReflectionAttribute[]
* @return \ReflectionAttribute<AsGrid>[]
*/
private static function getAttributes(): array
{
Expand Down

0 comments on commit 2759ae2

Please sign in to comment.