/** {@inheritdoc} */ public function defineProperty(string $propertyName) : PropertyBuilderInterface { if (array_key_exists($propertyName, $this->propertiesCollection)) { throw new PropertyDefinitionAlreadyExistsException(); } $propertyDefinition = new PropertyDefinition($this); $propertyDefinition->setPropertyName($propertyName); $this->propertiesCollection[$propertyName] = $propertyDefinition; return $propertyDefinition; }