/** * @return NodeElement[] * * @throws \InvalidArgumentException */ private function getProductAttributes() { $attributes = $this->showPage->getAttributes(); Assert::notNull($attributes, 'The product has no attributes.'); return $attributes; }