* @implements CollectionInterface */ abstract class AbstractLazyCollection extends BaseAbstractLazyCollection implements CollectionInterface { /** * @par ArrayCollection * @phpstan-var ArrayCollection */ protected $collection; /** * {@inheritDoc} * @phpstan-return ArrayCollection */ public function reverse() { $this->initialize(); return $this->collection->reverse(); } /** * {@inheritDoc} * @phpstan-return ArrayCollection */ public function shuffle() { $this->initialize(); return $this->collection->shuffle(); } /** * {@inheritDoc} */ public function chunk($size) { $this->initialize(); return $this->collection->chunk($size); } /** * {@inheritDoc} * @phpstan-param array $keys * @phpstan-return ArrayCollection */ public function select(array $keys) { $this->initialize(); return $this->collection->select($keys); } /** * {@inheritDoc} * @phpstan-param array $keys * @phpstan-return ArrayCollection */ public function unselect(array $keys) { $this->initialize(); return $this->collection->unselect($keys); } /** * @return array */ #[\ReturnTypeWillChange] public function jsonSerialize() { $this->initialize(); return $this->collection->jsonSerialize(); } }