/**
  * {@inheritdoc}
  */
 public function build()
 {
     if (null === $this->constraints) {
         throw new InvalidConfigurationException();
     }
     return array_map(function (Constraint $constraint) {
         return $this->factory->create($constraint);
     }, $this->constraints);
 }
 /**
  * @return ConstraintBuilder
  */
 private function createBuilder()
 {
     return new ConstraintBuilder($this->factory->reveal());
 }