/** * {@inheritdoc} */ public function unique(int $flags = self::SORT_REGULAR) : CollectionInterface { return new self($this->type, parent::unique($flags)->toPrimitive()); }