Exemple #1
0
 /**
  * @param ParameterInterface $parameter
  */
 public function addParameter(ParameterInterface $parameter)
 {
     $value = $this->getValue();
     if (!in_array($parameter->getName(), $value)) {
         $value[] = $parameter->getName();
         $this->setValue($value);
     }
 }
Exemple #2
0
 private function translate(ParameterInterface $parameter)
 {
     if ($parameter->value() instanceof MapInterface) {
         return $parameter->value()->reduce([], function (array $carry, $key, $value) : array {
             $carry[$key] = $value instanceof ParameterInterface ? $this->translate($value) : $value;
             return $carry;
         });
     }
     return $parameter->value();
 }