for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AardsGerds\Game\Dialog;
use AardsGerds\Game\Shared\Collection;
final class PlayerDialogOptionCollection extends Collection
{
/**
* @note This method mutates state of the collection
*/
public function remove(PlayerDialogOption $item): self
$this->items = $this->filter(
static fn(PlayerDialogOption $dialogOption): bool => $dialogOption !== $item,
)->getItems();
return $this;
}
public function clear(): self
$this->items = [];
protected function getType(): string
return PlayerDialogOption::class;