Deprecated: Return type of Google\Model::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 256

Deprecated: Return type of Google\Model::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 261

Deprecated: Return type of Google\Model::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 268

Deprecated: Return type of Google\Model::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 278

Deprecated: Return type of Google\Collection::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 22

Deprecated: Return type of Google\Collection::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 38

Deprecated: Return type of Google\Collection::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 30

Deprecated: Return type of Google\Collection::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 43

Deprecated: Return type of Google\Collection::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 14

Deprecated: Return type of Google\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 49
Symfony Profiler

vendor/easycorp/easyadmin-bundle/src/Collection/FilterCollection.php line 73

Open in your IDE?
  1. <?php
  2. namespace EasyCorp\Bundle\EasyAdminBundle\Collection;
  3. use EasyCorp\Bundle\EasyAdminBundle\Contracts\Collection\CollectionInterface;
  4. use EasyCorp\Bundle\EasyAdminBundle\Dto\FilterDto;
  5. /**
  6.  * @author Javier Eguiluz <javier.eguiluz@gmail.com>
  7.  */
  8. final class FilterCollection implements CollectionInterface
  9. {
  10.     /** @var FilterDto[] */
  11.     private $filters;
  12.     /**
  13.      * @param FilterDto[] $filters
  14.      */
  15.     private function __construct(array $filters)
  16.     {
  17.         $this->filters $filters;
  18.     }
  19.     /**
  20.      * @param FilterDto[] $filters
  21.      */
  22.     public static function new(array $filters = []): self
  23.     {
  24.         return new self($filters);
  25.     }
  26.     /**
  27.      * @return FilterDto[]
  28.      */
  29.     public function all(): array
  30.     {
  31.         return $this->filters;
  32.     }
  33.     public function get(string $filterName): ?FilterDto
  34.     {
  35.         return $this->filters[$filterName] ?? null;
  36.     }
  37.     public function offsetExists($offset): bool
  38.     {
  39.         return \array_key_exists($offset$this->filters);
  40.     }
  41.     public function offsetGet($offset)
  42.     {
  43.         return $this->filters[$offset];
  44.     }
  45.     public function offsetSet($offset$value): void
  46.     {
  47.         $this->filters[$offset] = $value;
  48.     }
  49.     public function offsetUnset($offset): void
  50.     {
  51.         unset($this->filters[$offset]);
  52.     }
  53.     public function count(): int
  54.     {
  55.         return \count($this->filters);
  56.     }
  57.     /**
  58.      * @return \ArrayIterator|\Traversable|FilterDto[]
  59.      */
  60.     public function getIterator()
  61.     {
  62.         return new \ArrayIterator($this->filters);
  63.     }
  64. }