/** * {@inheritdoc} */ public function grep(string $pattern, bool $revert = false) : CollectionInterface { return new self($this->type, parent::grep($pattern, $revert)->toPrimitive()); }