@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | return false; |
343 | 343 | } |
344 | 344 | if (null !== $this->apcuPrefix) { |
345 | - $file = apcu_fetch($this->apcuPrefix.$class, $hit); |
|
345 | + $file = apcu_fetch($this->apcuPrefix . $class, $hit); |
|
346 | 346 | if ($hit) { |
347 | 347 | return $file; |
348 | 348 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | if (null !== $this->apcuPrefix) { |
359 | - apcu_add($this->apcuPrefix.$class, $file); |
|
359 | + apcu_add($this->apcuPrefix . $class, $file); |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | if (false === $file) { |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | $subPath = $class; |
378 | 378 | while (false !== $lastPos = strrpos($subPath, '\\')) { |
379 | 379 | $subPath = substr($subPath, 0, $lastPos); |
380 | - $search = $subPath.'\\'; |
|
380 | + $search = $subPath . '\\'; |
|
381 | 381 | if (isset($this->prefixDirsPsr4[$search])) { |
382 | 382 | foreach ($this->prefixDirsPsr4[$search] as $dir) { |
383 | 383 | $length = $this->prefixLengthsPsr4[$first][$search]; |
@@ -6,55 +6,55 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInita05347a33fae9bdb6b099d5455d6f527 |
8 | 8 | { |
9 | - public static $files = array ( |
|
9 | + public static $files = array( |
|
10 | 10 | 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', |
11 | 11 | 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', |
12 | 12 | '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', |
13 | 13 | ); |
14 | 14 | |
15 | - public static $prefixLengthsPsr4 = array ( |
|
15 | + public static $prefixLengthsPsr4 = array( |
|
16 | 16 | 'P' => |
17 | - array ( |
|
17 | + array( |
|
18 | 18 | 'Psr\\Http\\Message\\' => 17, |
19 | 19 | ), |
20 | 20 | 'G' => |
21 | - array ( |
|
21 | + array( |
|
22 | 22 | 'GuzzleHttp\\Psr7\\' => 16, |
23 | 23 | 'GuzzleHttp\\Promise\\' => 19, |
24 | 24 | 'GuzzleHttp\\' => 11, |
25 | 25 | ), |
26 | 26 | 'A' => |
27 | - array ( |
|
27 | + array( |
|
28 | 28 | 'Alfred\\Workflows\\' => 17, |
29 | 29 | ), |
30 | 30 | ); |
31 | 31 | |
32 | - public static $prefixDirsPsr4 = array ( |
|
32 | + public static $prefixDirsPsr4 = array( |
|
33 | 33 | 'Psr\\Http\\Message\\' => |
34 | - array ( |
|
34 | + array( |
|
35 | 35 | 0 => __DIR__ . '/..' . '/psr/http-message/src', |
36 | 36 | ), |
37 | 37 | 'GuzzleHttp\\Psr7\\' => |
38 | - array ( |
|
38 | + array( |
|
39 | 39 | 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', |
40 | 40 | ), |
41 | 41 | 'GuzzleHttp\\Promise\\' => |
42 | - array ( |
|
42 | + array( |
|
43 | 43 | 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', |
44 | 44 | ), |
45 | 45 | 'GuzzleHttp\\' => |
46 | - array ( |
|
46 | + array( |
|
47 | 47 | 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', |
48 | 48 | ), |
49 | 49 | 'Alfred\\Workflows\\' => |
50 | - array ( |
|
50 | + array( |
|
51 | 51 | 0 => __DIR__ . '/..' . '/joetannenbaum/alfred-workflow/src', |
52 | 52 | ), |
53 | 53 | ); |
54 | 54 | |
55 | 55 | public static function getInitializer(ClassLoader $loader) |
56 | 56 | { |
57 | - return \Closure::bind(function () use ($loader) { |
|
57 | + return \Closure::bind(function() use ($loader) { |
|
58 | 58 | $loader->prefixLengthsPsr4 = ComposerStaticInita05347a33fae9bdb6b099d5455d6f527::$prefixLengthsPsr4; |
59 | 59 | $loader->prefixDirsPsr4 = ComposerStaticInita05347a33fae9bdb6b099d5455d6f527::$prefixDirsPsr4; |
60 | 60 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function sortResults($direction = 'asc', $property = 'title') |
32 | 32 | { |
33 | - usort($this->results, function ($a, $b) use ($direction, $property) { |
|
33 | + usort($this->results, function($a, $b) use ($direction, $property) { |
|
34 | 34 | if ($direction === 'asc') { |
35 | 35 | return $a->$property > $b->$property; |
36 | 36 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $query = (string) $query; |
59 | 59 | |
60 | - $this->results = array_filter($this->results, function ($result) use ($query, $property) { |
|
60 | + $this->results = array_filter($this->results, function($result) use ($query, $property) { |
|
61 | 61 | return strstr($result->$property, $query) !== false; |
62 | 62 | }); |
63 | 63 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | public function output() |
73 | 73 | { |
74 | 74 | $output = [ |
75 | - 'items' => array_map(function ($result) { |
|
75 | + 'items' => array_map(function($result) { |
|
76 | 76 | return $result->toArray(); |
77 | 77 | }, array_values($this->results)), |
78 | 78 | ]; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | public function toArray() |
90 | 90 | { |
91 | - return array_map(function (SetCookie $cookie) { |
|
91 | + return array_map(function(SetCookie $cookie) { |
|
92 | 92 | return $cookie->toArray(); |
93 | 93 | }, $this->getIterator()->getArrayCopy()); |
94 | 94 | } |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | } elseif (!$path) { |
102 | 102 | $this->cookies = array_filter( |
103 | 103 | $this->cookies, |
104 | - function (SetCookie $cookie) use ($path, $domain) { |
|
104 | + function(SetCookie $cookie) use ($path, $domain) { |
|
105 | 105 | return !$cookie->matchesDomain($domain); |
106 | 106 | } |
107 | 107 | ); |
108 | 108 | } elseif (!$name) { |
109 | 109 | $this->cookies = array_filter( |
110 | 110 | $this->cookies, |
111 | - function (SetCookie $cookie) use ($path, $domain) { |
|
111 | + function(SetCookie $cookie) use ($path, $domain) { |
|
112 | 112 | return !($cookie->matchesPath($path) && |
113 | 113 | $cookie->matchesDomain($domain)); |
114 | 114 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } else { |
117 | 117 | $this->cookies = array_filter( |
118 | 118 | $this->cookies, |
119 | - function (SetCookie $cookie) use ($path, $domain, $name) { |
|
119 | + function(SetCookie $cookie) use ($path, $domain, $name) { |
|
120 | 120 | return !($cookie->getName() == $name && |
121 | 121 | $cookie->matchesPath($path) && |
122 | 122 | $cookie->matchesDomain($domain)); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | { |
130 | 130 | $this->cookies = array_filter( |
131 | 131 | $this->cookies, |
132 | - function (SetCookie $cookie) { |
|
132 | + function(SetCookie $cookie) { |
|
133 | 133 | return !$cookie->getDiscard() && $cookie->getExpires(); |
134 | 134 | } |
135 | 135 | ); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | return $fn($request, $options) |
69 | - ->then(function (ResponseInterface $response) use ($request, $options) { |
|
69 | + ->then(function(ResponseInterface $response) use ($request, $options) { |
|
70 | 70 | return $this->checkRedirect($request, $options, $response); |
71 | 71 | }); |
72 | 72 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | private function withTracking(PromiseInterface $promise, $uri) |
119 | 119 | { |
120 | 120 | return $promise->then( |
121 | - function (ResponseInterface $response) use ($uri) { |
|
121 | + function(ResponseInterface $response) use ($uri) { |
|
122 | 122 | // Note that we are pushing to the front of the list as this |
123 | 123 | // would be an earlier response than what is currently present |
124 | 124 | // in the history header. |
@@ -177,7 +177,7 @@ |
||
177 | 177 | $idx = is_callable($remove) ? 0 : 1; |
178 | 178 | $this->stack = array_values(array_filter( |
179 | 179 | $this->stack, |
180 | - function ($tuple) use ($idx, $remove) { |
|
180 | + function($tuple) use ($idx, $remove) { |
|
181 | 181 | return $tuple[$idx] !== $remove; |
182 | 182 | } |
183 | 183 | )); |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public static function cookies() |
26 | 26 | { |
27 | - return function (callable $handler) { |
|
28 | - return function ($request, array $options) use ($handler) { |
|
27 | + return function(callable $handler) { |
|
28 | + return function($request, array $options) use ($handler) { |
|
29 | 29 | if (empty($options['cookies'])) { |
30 | 30 | return $handler($request, $options); |
31 | 31 | } elseif (!($options['cookies'] instanceof CookieJarInterface)) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $cookieJar = $options['cookies']; |
35 | 35 | $request = $cookieJar->withCookieHeader($request); |
36 | 36 | return $handler($request, $options) |
37 | - ->then(function ($response) use ($cookieJar, $request) { |
|
37 | + ->then(function($response) use ($cookieJar, $request) { |
|
38 | 38 | $cookieJar->extractCookies($request, $response); |
39 | 39 | return $response; |
40 | 40 | } |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public static function httpErrors() |
53 | 53 | { |
54 | - return function (callable $handler) { |
|
55 | - return function ($request, array $options) use ($handler) { |
|
54 | + return function(callable $handler) { |
|
55 | + return function($request, array $options) use ($handler) { |
|
56 | 56 | if (empty($options['http_errors'])) { |
57 | 57 | return $handler($request, $options); |
58 | 58 | } |
59 | 59 | return $handler($request, $options)->then( |
60 | - function (ResponseInterface $response) use ($request, $handler) { |
|
60 | + function(ResponseInterface $response) use ($request, $handler) { |
|
61 | 61 | $code = $response->getStatusCode(); |
62 | 62 | if ($code < 400) { |
63 | 63 | return $response; |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); |
84 | 84 | } |
85 | 85 | |
86 | - return function (callable $handler) use (&$container) { |
|
87 | - return function ($request, array $options) use ($handler, &$container) { |
|
86 | + return function(callable $handler) use (&$container) { |
|
87 | + return function($request, array $options) use ($handler, &$container) { |
|
88 | 88 | return $handler($request, $options)->then( |
89 | - function ($value) use ($request, &$container, $options) { |
|
89 | + function($value) use ($request, &$container, $options) { |
|
90 | 90 | $container[] = [ |
91 | 91 | 'request' => $request, |
92 | 92 | 'response' => $value, |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ]; |
96 | 96 | return $value; |
97 | 97 | }, |
98 | - function ($reason) use ($request, &$container, $options) { |
|
98 | + function($reason) use ($request, &$container, $options) { |
|
99 | 99 | $container[] = [ |
100 | 100 | 'request' => $request, |
101 | 101 | 'response' => null, |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public static function tap(callable $before = null, callable $after = null) |
126 | 126 | { |
127 | - return function (callable $handler) use ($before, $after) { |
|
128 | - return function ($request, array $options) use ($handler, $before, $after) { |
|
127 | + return function(callable $handler) use ($before, $after) { |
|
128 | + return function($request, array $options) use ($handler, $before, $after) { |
|
129 | 129 | if ($before) { |
130 | 130 | $before($request, $options); |
131 | 131 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public static function redirect() |
147 | 147 | { |
148 | - return function (callable $handler) { |
|
148 | + return function(callable $handler) { |
|
149 | 149 | return new RedirectMiddleware($handler); |
150 | 150 | }; |
151 | 151 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | */ |
168 | 168 | public static function retry(callable $decider, callable $delay = null) |
169 | 169 | { |
170 | - return function (callable $handler) use ($decider, $delay) { |
|
170 | + return function(callable $handler) use ($decider, $delay) { |
|
171 | 171 | return new RetryMiddleware($decider, $handler, $delay); |
172 | 172 | }; |
173 | 173 | } |
@@ -184,15 +184,15 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO) |
186 | 186 | { |
187 | - return function (callable $handler) use ($logger, $formatter, $logLevel) { |
|
188 | - return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) { |
|
187 | + return function(callable $handler) use ($logger, $formatter, $logLevel) { |
|
188 | + return function($request, array $options) use ($handler, $logger, $formatter, $logLevel) { |
|
189 | 189 | return $handler($request, $options)->then( |
190 | - function ($response) use ($logger, $request, $formatter, $logLevel) { |
|
190 | + function($response) use ($logger, $request, $formatter, $logLevel) { |
|
191 | 191 | $message = $formatter->format($request, $response); |
192 | 192 | $logger->log($logLevel, $message); |
193 | 193 | return $response; |
194 | 194 | }, |
195 | - function ($reason) use ($logger, $request, $formatter) { |
|
195 | + function($reason) use ($logger, $request, $formatter) { |
|
196 | 196 | $response = $reason instanceof RequestException |
197 | 197 | ? $reason->getResponse() |
198 | 198 | : null; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public static function prepareBody() |
215 | 215 | { |
216 | - return function (callable $handler) { |
|
216 | + return function(callable $handler) { |
|
217 | 217 | return new PrepareBodyMiddleware($handler); |
218 | 218 | }; |
219 | 219 | } |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public static function mapRequest(callable $fn) |
230 | 230 | { |
231 | - return function (callable $handler) use ($fn) { |
|
232 | - return function ($request, array $options) use ($handler, $fn) { |
|
231 | + return function(callable $handler) use ($fn) { |
|
232 | + return function($request, array $options) use ($handler, $fn) { |
|
233 | 233 | return $handler($fn($request), $options); |
234 | 234 | }; |
235 | 235 | }; |
@@ -245,8 +245,8 @@ discard block |
||
245 | 245 | */ |
246 | 246 | public static function mapResponse(callable $fn) |
247 | 247 | { |
248 | - return function (callable $handler) use ($fn) { |
|
249 | - return function ($request, array $options) use ($handler, $fn) { |
|
248 | + return function(callable $handler) use ($fn) { |
|
249 | + return function($request, array $options) use ($handler, $fn) { |
|
250 | 250 | return $handler($request, $options)->then($fn); |
251 | 251 | }; |
252 | 252 | }; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | private function onFulfilled(RequestInterface $req, array $options) |
75 | 75 | { |
76 | - return function ($value) use ($req, $options) { |
|
76 | + return function($value) use ($req, $options) { |
|
77 | 77 | if (!call_user_func( |
78 | 78 | $this->decider, |
79 | 79 | $options['retries'], |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | private function onRejected(RequestInterface $req, array $options) |
91 | 91 | { |
92 | - return function ($reason) use ($req, $options) { |
|
92 | + return function($reason) use ($req, $options) { |
|
93 | 93 | if (!call_user_func( |
94 | 94 | $this->decider, |
95 | 95 | $options['retries'], |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | return preg_replace_callback( |
75 | 75 | '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', |
76 | - function (array $matches) use ($request, $response, $error, &$cache) { |
|
76 | + function(array $matches) use ($request, $response, $error, &$cache) { |
|
77 | 77 | |
78 | 78 | if (isset($cache[$matches[1]])) { |
79 | 79 | return $cache[$matches[1]]; |