| @@ 50-56 (lines=7) @@ | ||
| 47 | $value = $schema->filter($value); |
|
| 48 | } |
|
| 49 | ||
| 50 | if (! $this->validator->validate($schema, $value)) { |
|
| 51 | $errors = array_merge($errors, $this->validator->getErrors()); |
|
| 52 | } elseif ($value !== $command[$name]) { |
|
| 53 | // Update the config value if it changed and no validation |
|
| 54 | // errors were encountered |
|
| 55 | $command[$name] = $value; |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | if ($params = $operation->getAdditionalParameters()) { |
|
| @@ 65-69 (lines=5) @@ | ||
| 62 | if (! $operation->hasParam($name)) { |
|
| 63 | // Always set the name so that error messages are useful |
|
| 64 | $params->setName($name); |
|
| 65 | if (! $this->validator->validate($params, $value)) { |
|
| 66 | $errors = array_merge($errors, $this->validator->getErrors()); |
|
| 67 | } elseif ($value !== $command[$name]) { |
|
| 68 | $command[$name] = $value; |
|
| 69 | } |
|
| 70 | } |
|
| 71 | } |
|
| 72 | } |
|