Completed
Pull Request — guzzle6 (#109)
by Stefano
05:29
created
src/RequestLocation/XmlLocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/SchemaValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -245,12 +245,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Handler/ValidatedDescriptionHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function __invoke(callable $handler)
39 39
     {
40
-        return function (CommandInterface $command) use ($handler) {
40
+        return function(CommandInterface $command) use ($handler) {
41 41
             $errors = [];
42 42
             $operation = $this->description->getOperation($command->getName());
43 43
 
44 44
             foreach ($operation->getParams() as $name => $schema) {
45 45
                 $value = $command[$name];
46
-                if (! $this->validator->validate($schema, $value)) {
46
+                if (!$this->validator->validate($schema, $value)) {
47 47
                     $errors = array_merge($errors, $this->validator->getErrors());
48 48
                 } elseif ($value !== $command[$name]) {
49 49
                     // Update the config value if it changed and no validation
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
             if ($params = $operation->getAdditionalParameters()) {
56 56
                 foreach ($command->toArray() as $name => $value) {
57 57
                     // It's only additional if it isn't defined in the schema
58
-                    if (! $operation->hasParam($name)) {
58
+                    if (!$operation->hasParam($name)) {
59 59
                         // Always set the name so that error messages are useful
60 60
                         $params->setName($name);
61
-                        if (! $this->validator->validate($params, $value)) {
61
+                        if (!$this->validator->validate($params, $value)) {
62 62
                             $errors = array_merge($errors, $this->validator->getErrors());
63 63
                         } elseif ($value !== $command[$name]) {
64 64
                             $command[$name] = $value;
Please login to merge, or discard this patch.
src/Deserializer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
                 continue;
278 278
             }
279 279
 
280
-            if (isset($error['phrase']) && ! ($error['phrase'] === $response->getReasonPhrase())) {
280
+            if (isset($error['phrase']) && !($error['phrase'] === $response->getReasonPhrase())) {
281 281
                 continue;
282 282
             }
283 283
 
Please login to merge, or discard this patch.
src/GuzzleClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     private function getSerializer($commandToRequestTransformer)
98 98
     {
99
-        return $commandToRequestTransformer ==! null
99
+        return $commandToRequestTransformer == !null
100 100
             ? $commandToRequestTransformer
101 101
             : new Serializer($this->description);
102 102
     }
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
      */
110 110
     private function getDeserializer($responseToResultTransformer)
111 111
     {
112
-        $process = (! isset($this->config['process']) || $this->config['process'] === true);
112
+        $process = (!isset($this->config['process']) || $this->config['process'] === true);
113 113
 
114
-        return $responseToResultTransformer ==! null
114
+        return $responseToResultTransformer == !null
115 115
             ? $responseToResultTransformer
116 116
             : new Deserializer($this->description, $process);
117 117
     }
Please login to merge, or discard this patch.