@@ -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 | ); |
@@ -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 @@ |
||
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]]; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | : \GuzzleHttp\Promise\promise_for($response); |
83 | 83 | |
84 | 84 | return $response->then( |
85 | - function ($value) use ($request, $options) { |
|
85 | + function($value) use ($request, $options) { |
|
86 | 86 | $this->invokeStats($request, $options, $value); |
87 | 87 | if ($this->onFulfilled) { |
88 | 88 | call_user_func($this->onFulfilled, $value); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | return $value; |
104 | 104 | }, |
105 | - function ($reason) use ($request, $options) { |
|
105 | + function($reason) use ($request, $options) { |
|
106 | 106 | $this->invokeStats($request, $options, null, $reason); |
107 | 107 | if ($this->onRejected) { |
108 | 108 | call_user_func($this->onRejected, $reason); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | if ($body->isSeekable()) { |
269 | 269 | $body->rewind(); |
270 | 270 | } |
271 | - $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { |
|
271 | + $conf[CURLOPT_READFUNCTION] = function($ch, $fd, $length) use ($body) { |
|
272 | 272 | return $body->read($length); |
273 | 273 | }; |
274 | 274 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $sink = new LazyOpenStream($sink, 'w+'); |
363 | 363 | } |
364 | 364 | $easy->sink = $sink; |
365 | - $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) { |
|
365 | + $conf[CURLOPT_WRITEFUNCTION] = function($ch, $write) use ($sink) { |
|
366 | 366 | return $sink->write($write); |
367 | 367 | }; |
368 | 368 | } else { |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | ); |
432 | 432 | } |
433 | 433 | $conf[CURLOPT_NOPROGRESS] = false; |
434 | - $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) { |
|
434 | + $conf[CURLOPT_PROGRESSFUNCTION] = function() use ($progress) { |
|
435 | 435 | $args = func_get_args(); |
436 | 436 | // PHP 5.5 pushed the handle onto the start of the args |
437 | 437 | if (is_resource($args[0])) { |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | $onHeaders = null; |
506 | 506 | } |
507 | 507 | |
508 | - return function ($ch, $h) use ( |
|
508 | + return function($ch, $h) use ( |
|
509 | 509 | $onHeaders, |
510 | 510 | $easy, |
511 | 511 | &$startingResponse |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | callable $default, |
23 | 23 | callable $sync |
24 | 24 | ) { |
25 | - return function (RequestInterface $request, array $options) use ($default, $sync) { |
|
25 | + return function(RequestInterface $request, array $options) use ($default, $sync) { |
|
26 | 26 | return empty($options[RequestOptions::SYNCHRONOUS]) |
27 | 27 | ? $default($request, $options) |
28 | 28 | : $sync($request, $options); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | callable $default, |
47 | 47 | callable $streaming |
48 | 48 | ) { |
49 | - return function (RequestInterface $request, array $options) use ($default, $streaming) { |
|
49 | + return function(RequestInterface $request, array $options) use ($default, $streaming) { |
|
50 | 50 | return empty($options['stream']) |
51 | 51 | ? $default($request, $options) |
52 | 52 | : $streaming($request, $options); |