Esempio n. 1
0
 /**
  * @param Constraint $newConstraint
  *
  * @return $this|Builder
  * @author Panagiotis Vagenas <*****@*****.**>
  * @since  1.0.0
  */
 public function updateConstraint(Constraint $newConstraint)
 {
     if ($oldConstraint = $this->getConstraint($newConstraint->getName())) {
         return $oldConstraint->exchangeArray($newConstraint->getArrayCopy());
     }
     return $this->addConstraint($newConstraint);
 }