/**
  * {@inheritdoc}
  */
 public function setPosition($position)
 {
     if ($this->locked) {
         throw new BadMethodCallException('The config builder cannot be modified anymore.');
     }
     if (is_string($position) && $position !== 'first' && $position !== 'last') {
         throw OrderedConfigurationException::createInvalidStringPosition($this->getName(), $position);
     }
     if (is_array($position) && !isset($position['before']) && !isset($position['after'])) {
         throw OrderedConfigurationException::createInvalidArrayPosition($this->getName(), $position);
     }
     $this->position = $position;
     return $this;
 }