Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function finalizeValue($value)
 {
     if (!$this->allowEmptyValue && $this->isValueEmpty($value)) {
         $ex = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value)));
         if ($hint = $this->getInfo()) {
             $ex->addHint($hint);
         }
         $ex->setPath($this->getPath());
         throw $ex;
     }
     return $value;
 }