@@ -93,7 +93,7 @@ |
||
93 | 93 | /** |
94 | 94 | * Get the basePath/baseUrl of the description |
95 | 95 | * |
96 | - * @return Url |
|
96 | + * @return string |
|
97 | 97 | */ |
98 | 98 | public function getBaseUrl() |
99 | 99 | { |
@@ -108,7 +108,7 @@ |
||
108 | 108 | * |
109 | 109 | * @param DescriptionInterface $description Service description |
110 | 110 | * |
111 | - * @return callable Returns a command factory |
|
111 | + * @return \Closure Returns a command factory |
|
112 | 112 | */ |
113 | 113 | public static function defaultCommandFactory(DescriptionInterface $description) |
114 | 114 | { |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use GuzzleHttp\Command\CommandTransaction; |
8 | 8 | use GuzzleHttp\Command\Guzzle\Subscriber\ProcessResponse; |
9 | 9 | use GuzzleHttp\Command\Guzzle\Subscriber\ValidateInput; |
10 | -use GuzzleHttp\Event\HasEmitterTrait; |
|
11 | 10 | use GuzzleHttp\Command\ServiceClientInterface; |
12 | 11 | use GuzzleHttp\Ring\Future\FutureArray; |
13 | 12 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | protected function createFutureResult(CommandTransaction $transaction) |
89 | 89 | { |
90 | 90 | return new FutureArray( |
91 | - $transaction->response->then(function () use ($transaction) { |
|
91 | + $transaction->response->then(function() use ($transaction) { |
|
92 | 92 | return $transaction->result; |
93 | 93 | }), |
94 | 94 | [$transaction->response, 'wait'], |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public static function defaultCommandFactory(DescriptionInterface $description) |
114 | 114 | { |
115 | - return function ( |
|
115 | + return function( |
|
116 | 116 | $name, |
117 | 117 | array $args = [], |
118 | 118 | ServiceClientInterface $client |
@@ -239,7 +239,7 @@ |
||
239 | 239 | * @param string $name Name of the data point to retrieve or null to |
240 | 240 | * retrieve all of the extra data. |
241 | 241 | * |
242 | - * @return mixed|null |
|
242 | + * @return string |
|
243 | 243 | */ |
244 | 244 | public function getData($name = null) |
245 | 245 | { |
@@ -241,7 +241,7 @@ |
||
241 | 241 | * |
242 | 242 | * @param \XMLWriter $writer |
243 | 243 | * |
244 | - * @return \string the writer resource |
|
244 | + * @return string the writer resource |
|
245 | 245 | */ |
246 | 246 | protected function finishDocument($writer) |
247 | 247 | { |
@@ -121,7 +121,7 @@ |
||
121 | 121 | foreach ((array) $root['namespaces'] as $prefix => $uri) { |
122 | 122 | $nsLabel = 'xmlns'; |
123 | 123 | if (!is_numeric($prefix)) { |
124 | - $nsLabel .= ':'.$prefix; |
|
124 | + $nsLabel .= ':' . $prefix; |
|
125 | 125 | } |
126 | 126 | $writer->writeAttribute($nsLabel, $uri); |
127 | 127 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * @param string $type Parameter type |
59 | 59 | * @param mixed $value Value to determine the type |
60 | 60 | * |
61 | - * @return string|bool Returns the matching type on |
|
61 | + * @return string|false Returns the matching type on |
|
62 | 62 | */ |
63 | 63 | protected function determineType($type, $value) |
64 | 64 | { |
@@ -245,12 +245,12 @@ |
||
245 | 245 | |
246 | 246 | // Strings can have enums which are a list of predefined values |
247 | 247 | if (($enum = $param->getEnum()) && !in_array($value, $enum)) { |
248 | - $this->errors[] = "{$path} must be one of " . implode(' or ', array_map(function ($s) { |
|
248 | + $this->errors[] = "{$path} must be one of " . implode(' or ', array_map(function($s) { |
|
249 | 249 | return '"' . addslashes($s) . '"'; |
250 | 250 | }, $enum)); |
251 | 251 | } |
252 | 252 | // Strings can have a regex pattern that the value must match |
253 | - if (($pattern = $param->getPattern()) && !preg_match($pattern, $value)) { |
|
253 | + if (($pattern = $param->getPattern()) && !preg_match($pattern, $value)) { |
|
254 | 254 | $this->errors[] = "{$path} must match the following regular expression: {$pattern}"; |
255 | 255 | } |
256 | 256 |
@@ -118,6 +118,9 @@ |
||
118 | 118 | return $result; |
119 | 119 | } |
120 | 120 | |
121 | + /** |
|
122 | + * @param string|null $location |
|
123 | + */ |
|
121 | 124 | private function triggerBeforeVisitor( |
122 | 125 | $location, |
123 | 126 | Parameter $model, |