Completed
Push — master ( f271f8...481b46 )
by Rolf
03:32
created
src/Guzzle/Plugin/Mock/MockPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
         $item = array_shift($this->queue);
185 185
         if ($item instanceof Response) {
186 186
             if ($this->readBodies && $request instanceof EntityEnclosingRequestInterface) {
187
-                $request->getEventDispatcher()->addListener('request.sent', $f = function (Event $event) use (&$f) {
187
+                $request->getEventDispatcher()->addListener('request.sent', $f = function(Event $event) use (&$f) {
188 188
                     while ($data = $event['request']->getBody()->read(8096));
189 189
                     // Remove the listener after one-time use
190 190
                     $event['request']->getEventDispatcher()->removeListener('request.sent', $f);
Please login to merge, or discard this patch.
src/Guzzle/Plugin/History/HistoryPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
     public function getIterator()
105 105
     {
106 106
         // Return an iterator just like the old iteration of the HistoryPlugin for BC compatibility (use getAll())
107
-        return new \ArrayIterator(array_map(function ($entry) {
107
+        return new \ArrayIterator(array_map(function($entry) {
108 108
             $entry['request']->getParams()->set('actual_response', $entry['response']);
109 109
             return $entry['request'];
110 110
         }, $this->transactions));
Please login to merge, or discard this patch.
src/Guzzle/Plugin/Log/LogPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
             }
63 63
         }
64 64
 
65
-        return new self(new ClosureLogAdapter(function ($m) use ($stream) {
65
+        return new self(new ClosureLogAdapter(function($m) use ($stream) {
66 66
             fwrite($stream, $m . PHP_EOL);
67 67
         }), "# Request:\n{request}\n\n# Response:\n{response}\n\n# Errors: {curl_code} {curl_error}", $wireBodies);
68 68
     }
Please login to merge, or discard this patch.
src/Guzzle/Plugin/Cookie/CookieJar/ArrayCookieJar.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function remove($domain = null, $path = null, $name = null)
43 43
     {
44 44
         $cookies = $this->all($domain, $path, $name, false, false);
45
-        $this->cookies = array_filter($this->cookies, function (Cookie $cookie) use ($cookies) {
45
+        $this->cookies = array_filter($this->cookies, function(Cookie $cookie) use ($cookies) {
46 46
             return !in_array($cookie, $cookies, true);
47 47
         });
48 48
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function removeTemporary()
53 53
     {
54
-        $this->cookies = array_filter($this->cookies, function (Cookie $cookie) {
54
+        $this->cookies = array_filter($this->cookies, function(Cookie $cookie) {
55 55
             return !$cookie->getDiscard() && $cookie->getExpires();
56 56
         });
57 57
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function removeExpired()
62 62
     {
63 63
         $currentTime = time();
64
-        $this->cookies = array_filter($this->cookies, function (Cookie $cookie) use ($currentTime) {
64
+        $this->cookies = array_filter($this->cookies, function(Cookie $cookie) use ($currentTime) {
65 65
             return !$cookie->getExpires() || $currentTime < $cookie->getExpires();
66 66
         });
67 67
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function all($domain = null, $path = null, $name = null, $skipDiscardable = false, $skipExpired = true)
72 72
     {
73
-        return array_values(array_filter($this->cookies, function (Cookie $cookie) use (
73
+        return array_values(array_filter($this->cookies, function(Cookie $cookie) use (
74 74
             $domain,
75 75
             $path,
76 76
             $name,
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     public function serialize()
146 146
     {
147 147
         // Only serialize long term cookies and unexpired cookies
148
-        return json_encode(array_map(function (Cookie $cookie) {
148
+        return json_encode(array_map(function(Cookie $cookie) {
149 149
             return $cookie->toArray();
150 150
         }, $this->all(null, null, null, true, true)));
151 151
     }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         if (empty($data)) {
160 160
             $this->cookies = array();
161 161
         } else {
162
-            $this->cookies = array_map(function (array $cookie) {
162
+            $this->cookies = array_map(function(array $cookie) {
163 163
                 return new Cookie($cookie);
164 164
             }, $data);
165 165
         }
Please login to merge, or discard this patch.
src/Guzzle/Plugin/ErrorResponse/ErrorResponsePlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     protected function getErrorClosure(RequestInterface $request, CommandInterface $command, Operation $operation)
48 48
     {
49
-        return function (Event $event) use ($request, $command, $operation) {
49
+        return function(Event $event) use ($request, $command, $operation) {
50 50
             $response = $event['response'];
51 51
             foreach ($operation->getErrorResponses() as $error) {
52 52
                 if (!isset($error['class'])) {
Please login to merge, or discard this patch.
src/Guzzle/Service/Command/LocationVisitor/Response/JsonVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         Response $response,
17 17
         Parameter $param,
18 18
         &$value,
19
-        $context =  null
19
+        $context = null
20 20
     ) {
21 21
         $value[$param->getName()] = $param->filter($response->getBody());
22 22
     }
Please login to merge, or discard this patch.
src/Guzzle/Service/Command/LocationVisitor/Response/XmlVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         Response $response,
17 17
         Parameter $param,
18 18
         &$value,
19
-        $context =  null
19
+        $context = null
20 20
     ) {
21 21
         $value[$param->getName()] = $param->filter($response->getBody());
22 22
     }
Please login to merge, or discard this patch.
src/Guzzle/Service/Command/LocationVisitor/Response/HeaderVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         Response $response,
17 17
         Parameter $param,
18 18
         &$value,
19
-        $context =  null
19
+        $context = null
20 20
     ) {
21 21
         $value[$param->getName()] = $param->filter($response->getBody());
22 22
     }
Please login to merge, or discard this patch.
Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         Response $response,
17 17
         Parameter $param,
18 18
         &$value,
19
-        $context =  null
19
+        $context = null
20 20
     ) {
21 21
         $value[$param->getName()] = $param->filter($response->getBody());
22 22
     }
Please login to merge, or discard this patch.