Skip to content

Commit

Permalink
Replaced PhpStan declarations.
Browse files Browse the repository at this point in the history
  • Loading branch information
bytes-commerce committed Sep 3, 2023
1 parent 81557f6 commit 0a528f8
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/ArgumentResolver/AdminContextResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
} else {
final class AdminContextResolver implements ArgumentValueResolverInterface
{
private AdminContextProvider $adminContextProvider;
private AdminContextProviderInterface $adminContextProvider;

public function __construct(AdminContextProviderInterface $adminContextProvider)
{
Expand Down
4 changes: 2 additions & 2 deletions src/ArgumentResolver/BatchActionDtoResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
} else {
final class BatchActionDtoResolver implements ArgumentValueResolverInterface
{
private AdminContextProvider $adminContextProvider;
private AdminUrlGenerator $adminUrlGenerator;
private AdminContextProviderInterface $adminContextProvider;
private AdminUrlGeneratorInterface $adminUrlGenerator;

public function __construct(AdminContextProviderInterface $adminContextProvider, AdminUrlGeneratorInterface $adminUrlGenerator)
{
Expand Down
14 changes: 9 additions & 5 deletions src/Collection/ActionCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Collection;

use ArrayIterator;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Collection\CollectionInterface;
use EasyCorp\Bundle\EasyAdminBundle\Dto\ActionDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\ActionDtoInterface;

use function array_key_exists;
use function count;

/**
* @author Javier Eguiluz <[email protected]>
*/
Expand Down Expand Up @@ -48,7 +52,7 @@ public function get(string $actionName): ?ActionDtoInterface

public function offsetExists(mixed $offset): bool
{
return \array_key_exists($offset, $this->actions);
return array_key_exists($offset, $this->actions);
}

public function offsetGet(mixed $offset): ActionDtoInterface
Expand All @@ -68,15 +72,15 @@ public function offsetUnset(mixed $offset): void

public function count(): int
{
return \count($this->actions);
return count($this->actions);
}

/**
* @return \ArrayIterator<ActionDto>
* @return ArrayIterator<ActionDtoInterface>
*/
public function getIterator(): \ArrayIterator
public function getIterator(): ArrayIterator
{
return new \ArrayIterator($this->actions);
return new ArrayIterator($this->actions);
}

public function getEntityActions(): self
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/EntityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function count(): int
}

/**
* @return \ArrayIterator<EntityDto>
* @return \ArrayIterator<EntityDtoInterface>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/FieldCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function count(): int
}

/**
* @return \ArrayIterator<FieldDto>
* @return \ArrayIterator<FieldDtoInterface>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/FilterCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function count(): int
}

/**
* @return \ArrayIterator<FilterDto>
* @return \ArrayIterator<FilterDtoInterface>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Dto/ActionConfigDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class ActionConfigDto implements ActionConfigDtoInterface
{
private ?string $pageName = null;
/**
* @var array<string,array<string,ActionDto>>
* @var array<string,array<string,ActionDtoInterface>>
*/
private array $actions = [
CrudInterface::PAGE_DETAIL => [],
Expand Down
1 change: 0 additions & 1 deletion src/Factory/FormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore;
use EasyCorp\Bundle\EasyAdminBundle\Config\Option\EA;
use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDtoInterface;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\CrudFormType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\FiltersFormType;
Expand Down

0 comments on commit 0a528f8

Please sign in to comment.