@@ -66,7 +66,7 @@ |
||
66 | 66 | $keepGoing = true; |
67 | 67 | $f = null; |
68 | 68 | |
69 | - $f = function () use ($cb, &$f, $timeout, &$keepGoing) { |
|
69 | + $f = function() use ($cb, &$f, $timeout, &$keepGoing) { |
|
70 | 70 | if ($keepGoing) { |
71 | 71 | $cb(); |
72 | 72 | $this->setTimeout($f, $timeout); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | function all(array $promises): Promise |
34 | 34 | { |
35 | - return new Promise(function ($success, $fail) use ($promises) { |
|
35 | + return new Promise(function($success, $fail) use ($promises) { |
|
36 | 36 | if (empty($promises)) { |
37 | 37 | $success([]); |
38 | 38 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | foreach ($promises as $promiseIndex => $subPromise) { |
46 | 46 | $subPromise->then( |
47 | - function ($result) use ($promiseIndex, &$completeResult, &$successCount, $success, $promises) { |
|
47 | + function($result) use ($promiseIndex, &$completeResult, &$successCount, $success, $promises) { |
|
48 | 48 | $completeResult[$promiseIndex] = $result; |
49 | 49 | ++$successCount; |
50 | 50 | if ($successCount === count($promises)) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | return $result; |
55 | 55 | } |
56 | 56 | )->otherwise( |
57 | - function ($reason) use ($fail) { |
|
57 | + function($reason) use ($fail) { |
|
58 | 58 | $fail($reason); |
59 | 59 | } |
60 | 60 | ); |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | */ |
74 | 74 | function race(array $promises): Promise |
75 | 75 | { |
76 | - return new Promise(function ($success, $fail) use ($promises) { |
|
76 | + return new Promise(function($success, $fail) use ($promises) { |
|
77 | 77 | $alreadyDone = false; |
78 | 78 | foreach ($promises as $promise) { |
79 | 79 | $promise->then( |
80 | - function ($result) use ($success, &$alreadyDone) { |
|
80 | + function($result) use ($success, &$alreadyDone) { |
|
81 | 81 | if ($alreadyDone) { |
82 | 82 | return; |
83 | 83 | } |
84 | 84 | $alreadyDone = true; |
85 | 85 | $success($result); |
86 | 86 | }, |
87 | - function ($reason) use ($fail, &$alreadyDone) { |
|
87 | + function($reason) use ($fail, &$alreadyDone) { |
|
88 | 88 | if ($alreadyDone) { |
89 | 89 | return; |
90 | 90 | } |
@@ -66,20 +66,20 @@ discard block |
||
66 | 66 | * So tempted to use the mythical y-combinator here, but it's not needed in |
67 | 67 | * PHP. |
68 | 68 | */ |
69 | - $advanceGenerator = function () use (&$advanceGenerator, $generator, $promise) { |
|
69 | + $advanceGenerator = function() use (&$advanceGenerator, $generator, $promise) { |
|
70 | 70 | while ($generator->valid()) { |
71 | 71 | $yieldedValue = $generator->current(); |
72 | 72 | if ($yieldedValue instanceof Promise) { |
73 | 73 | $yieldedValue->then( |
74 | - function ($value) use ($generator, &$advanceGenerator) { |
|
74 | + function($value) use ($generator, &$advanceGenerator) { |
|
75 | 75 | $generator->send($value); |
76 | 76 | $advanceGenerator(); |
77 | 77 | }, |
78 | - function (Throwable $reason) use ($generator, $advanceGenerator) { |
|
78 | + function(Throwable $reason) use ($generator, $advanceGenerator) { |
|
79 | 79 | $generator->throw($reason); |
80 | 80 | $advanceGenerator(); |
81 | 81 | } |
82 | - )->otherwise(function (Throwable $reason) use ($promise) { |
|
82 | + )->otherwise(function(Throwable $reason) use ($promise) { |
|
83 | 83 | // This error handler would be called, if something in the |
84 | 84 | // generator throws an exception, and it's not caught |
85 | 85 | // locally. |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | |
103 | 103 | // The return value is a promise. |
104 | 104 | if ($returnValue instanceof Promise) { |
105 | - $returnValue->then(function ($value) use ($promise) { |
|
105 | + $returnValue->then(function($value) use ($promise) { |
|
106 | 106 | $promise->fulfill($value); |
107 | - }, function (Throwable $reason) use ($promise) { |
|
107 | + }, function(Throwable $reason) use ($promise) { |
|
108 | 108 | $promise->reject($reason); |
109 | 109 | }); |
110 | 110 | } else { |
@@ -229,7 +229,7 @@ |
||
229 | 229 | // passed to 'then'. |
230 | 230 | // |
231 | 231 | // This makes the order of execution more predictable. |
232 | - Loop\nextTick(function () use ($callBack, $subPromise) { |
|
232 | + Loop\nextTick(function() use ($callBack, $subPromise) { |
|
233 | 233 | if (is_callable($callBack)) { |
234 | 234 | try { |
235 | 235 | $result = $callBack($this->value); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | if (!isset($this->listeners[$eventName])) { |
28 | 28 | $this->listeners[$eventName] = [ |
29 | - true, // If there's only one item, it's sorted |
|
29 | + true, // If there's only one item, it's sorted |
|
30 | 30 | [$priority], |
31 | 31 | [$callBack], |
32 | 32 | ]; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | public function once(string $eventName, callable $callBack, int $priority = 100) |
44 | 44 | { |
45 | 45 | $wrapper = null; |
46 | - $wrapper = function () use ($eventName, $callBack, &$wrapper) { |
|
46 | + $wrapper = function() use ($eventName, $callBack, &$wrapper) { |
|
47 | 47 | $this->removeListener($eventName, $wrapper); |
48 | 48 | |
49 | 49 | return \call_user_func_array($callBack, \func_get_args()); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | if (is_string($record)) { |
89 | 89 | $record = ['message' => $record]; |
90 | 90 | } |
91 | - return $this->hasRecordThatPasses(function ($rec) use ($record) { |
|
91 | + return $this->hasRecordThatPasses(function($rec) use ($record) { |
|
92 | 92 | if ($rec['message'] !== $record['message']) { |
93 | 93 | return false; |
94 | 94 | } |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | |
102 | 102 | public function hasRecordThatContains($message, $level) |
103 | 103 | { |
104 | - return $this->hasRecordThatPasses(function ($rec) use ($message) { |
|
104 | + return $this->hasRecordThatPasses(function($rec) use ($message) { |
|
105 | 105 | return strpos($rec['message'], $message) !== false; |
106 | 106 | }, $level); |
107 | 107 | } |
108 | 108 | |
109 | 109 | public function hasRecordThatMatches($regex, $level) |
110 | 110 | { |
111 | - return $this->hasRecordThatPasses(function ($rec) use ($regex) { |
|
111 | + return $this->hasRecordThatPasses(function($rec) use ($regex) { |
|
112 | 112 | return preg_match($regex, $rec['message']) > 0; |
113 | 113 | }, $level); |
114 | 114 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | class ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a |
8 | 8 | { |
9 | - public static $files = array ( |
|
9 | + public static $files = array( |
|
10 | 10 | '383eaff206634a77a1be54e64e6459c7' => __DIR__ . '/..' . '/sabre/uri/lib/functions.php', |
11 | 11 | '2b9d0f43f9552984cfa82fee95491826' => __DIR__ . '/..' . '/sabre/event/lib/coroutine.php', |
12 | 12 | 'd81bab31d3feb45bfe2f283ea3c8fdf7' => __DIR__ . '/..' . '/sabre/event/lib/Loop/functions.php', |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | 'ebdb698ed4152ae445614b69b5e4bb6a' => __DIR__ . '/..' . '/sabre/http/lib/functions.php', |
17 | 17 | ); |
18 | 18 | |
19 | - public static $prefixLengthsPsr4 = array ( |
|
19 | + public static $prefixLengthsPsr4 = array( |
|
20 | 20 | 'S' => |
21 | - array ( |
|
21 | + array( |
|
22 | 22 | 'Sabre\\Xml\\' => 10, |
23 | 23 | 'Sabre\\VObject\\' => 14, |
24 | 24 | 'Sabre\\Uri\\' => 10, |
@@ -27,49 +27,49 @@ discard block |
||
27 | 27 | 'Sabre\\' => 6, |
28 | 28 | ), |
29 | 29 | 'P' => |
30 | - array ( |
|
30 | + array( |
|
31 | 31 | 'Psr\\Log\\' => 8, |
32 | 32 | ), |
33 | 33 | ); |
34 | 34 | |
35 | - public static $prefixDirsPsr4 = array ( |
|
35 | + public static $prefixDirsPsr4 = array( |
|
36 | 36 | 'Sabre\\Xml\\' => |
37 | - array ( |
|
37 | + array( |
|
38 | 38 | 0 => __DIR__ . '/..' . '/sabre/xml/lib', |
39 | 39 | ), |
40 | 40 | 'Sabre\\VObject\\' => |
41 | - array ( |
|
41 | + array( |
|
42 | 42 | 0 => __DIR__ . '/..' . '/sabre/vobject/lib', |
43 | 43 | ), |
44 | 44 | 'Sabre\\Uri\\' => |
45 | - array ( |
|
45 | + array( |
|
46 | 46 | 0 => __DIR__ . '/..' . '/sabre/uri/lib', |
47 | 47 | ), |
48 | 48 | 'Sabre\\HTTP\\' => |
49 | - array ( |
|
49 | + array( |
|
50 | 50 | 0 => __DIR__ . '/..' . '/sabre/http/lib', |
51 | 51 | ), |
52 | 52 | 'Sabre\\Event\\' => |
53 | - array ( |
|
53 | + array( |
|
54 | 54 | 0 => __DIR__ . '/..' . '/sabre/event/lib', |
55 | 55 | ), |
56 | 56 | 'Sabre\\' => |
57 | - array ( |
|
57 | + array( |
|
58 | 58 | 0 => __DIR__ . '/..' . '/sabre/dav/lib', |
59 | 59 | ), |
60 | 60 | 'Psr\\Log\\' => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', |
63 | 63 | ), |
64 | 64 | ); |
65 | 65 | |
66 | - public static $classMap = array ( |
|
66 | + public static $classMap = array( |
|
67 | 67 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
68 | 68 | ); |
69 | 69 | |
70 | 70 | public static function getInitializer(ClassLoader $loader) |
71 | 71 | { |
72 | - return \Closure::bind(function () use ($loader) { |
|
72 | + return \Closure::bind(function() use ($loader) { |
|
73 | 73 | $loader->prefixLengthsPsr4 = ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::$prefixLengthsPsr4; |
74 | 74 | $loader->prefixDirsPsr4 = ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::$prefixDirsPsr4; |
75 | 75 | $loader->classMap = ComposerStaticInit51cd53f153efda61d1f1f814155d1c4a::$classMap; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * file to provide auto-loading of the classes in this library. |
6 | 6 | */ |
7 | 7 | |
8 | -spl_autoload_register(function ($class) { |
|
8 | +spl_autoload_register(function($class) { |
|
9 | 9 | /* |
10 | 10 | * PSR-4 autoloader, based on PHP Framework Interop Group snippet (Under MIT License.) |
11 | 11 | * https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md |
@@ -283,7 +283,7 @@ |
||
283 | 283 | public static function load(string $profileName) |
284 | 284 | { |
285 | 285 | self::loadCapabilitiesDataFile(); |
286 | - if (! isset(self::$profiles[$profileName])) { |
|
286 | + if (!isset(self::$profiles[$profileName])) { |
|
287 | 287 | $suggestionsArray = self::suggestProfileName($profileName); |
288 | 288 | $suggestionsStr = implode(", ", $suggestionsArray); |
289 | 289 | throw new InvalidArgumentException("The CapabilityProfile '$profileName' does not exist. Try one that does exist, such as $suggestionsStr."); |