|
@@ 50-57 (lines=8) @@
|
| 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 errors were encountered. |
| 54 |
|
// This happen when the user extending an operation |
| 55 |
|
// See https://github.com/guzzle/guzzle-services/issues/145 |
| 56 |
|
$command[$name] = $value; |
| 57 |
|
} |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
if ($params = $operation->getAdditionalParameters()) { |
|
@@ 66-70 (lines=5) @@
|
| 63 |
|
if (! $operation->hasParam($name)) { |
| 64 |
|
// Always set the name so that error messages are useful |
| 65 |
|
$params->setName($name); |
| 66 |
|
if (! $this->validator->validate($params, $value)) { |
| 67 |
|
$errors = array_merge($errors, $this->validator->getErrors()); |
| 68 |
|
} elseif ($value !== $command[$name]) { |
| 69 |
|
$command[$name] = $value; |
| 70 |
|
} |
| 71 |
|
} |
| 72 |
|
} |
| 73 |
|
} |