attributes[$type] ?? []; } public function setItemEntities(string $type, array $partEntities): void { if (!isset($this->attributes[$type])) { $this->attributes[$type] = []; } $this->attributes[$type] = $partEntities; // $this->attributes[$type] = array_unique($this->attributes[$type], SORT_REGULAR); } }