@@ -42,7 +42,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -46,7 +46,7 @@ |
||
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'])) { |