@@ -273,8 +273,8 @@ |
||
273 | 273 | public function generate(array $components) |
274 | 274 | { |
275 | 275 | $uri = $components['scheme'] . '://' |
276 | - . $components['authority'] |
|
277 | - . $components['path']; |
|
276 | + . $components['authority'] |
|
277 | + . $components['path']; |
|
278 | 278 | |
279 | 279 | if (array_key_exists('query', $components)) { |
280 | 280 | $uri .= $components['query']; |
@@ -245,7 +245,7 @@ |
||
245 | 245 | |
246 | 246 | $components = array(); |
247 | 247 | if (5 < count($match)) { |
248 | - $components = array( |
|
248 | + $components = array( |
|
249 | 249 | 'scheme' => $match[2], |
250 | 250 | 'authority' => $match[4], |
251 | 251 | 'path' => $match[5] |
@@ -58,8 +58,8 @@ |
||
58 | 58 | public function generate(array $components) |
59 | 59 | { |
60 | 60 | $uri = $components['scheme'] . '://' |
61 | - . $components['authority'] |
|
62 | - . $components['path']; |
|
61 | + . $components['authority'] |
|
62 | + . $components['path']; |
|
63 | 63 | |
64 | 64 | if (array_key_exists('query', $components) && strlen($components['query'])) { |
65 | 65 | $uri .= '?' . $components['query']; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $components = array(); |
34 | 34 | if (5 < count($match)) { |
35 | - $components = array( |
|
35 | + $components = array( |
|
36 | 36 | 'scheme' => $match[2], |
37 | 37 | 'authority' => $match[4], |
38 | 38 | 'path' => $match[5] |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $basePathSegments = explode('/', $basePath); |
136 | 136 | |
137 | 137 | preg_match('|^/?(\.\./(?:\./)*)*|', $relativePath, $match); |
138 | - $numLevelUp = strlen($match[0]) /3 + 1; |
|
138 | + $numLevelUp = strlen($match[0]) / 3 + 1; |
|
139 | 139 | if ($numLevelUp >= count($basePathSegments)) { |
140 | 140 | throw new UriResolverException(sprintf("Unable to resolve URI '%s' from base '%s'", $relativePath, $basePath)); |
141 | 141 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public function retrieve($uri) |
29 | 29 | { |
30 | 30 | $errorMessage = null; |
31 | - set_error_handler(function ($errno, $errstr) use (&$errorMessage) { |
|
31 | + set_error_handler(function($errno, $errstr) use (&$errorMessage) { |
|
32 | 32 | $errorMessage = $errstr; |
33 | 33 | }); |
34 | 34 | $response = file_get_contents($uri); |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | return false; |
450 | 450 | } |
451 | 451 | if (null !== $this->apcuPrefix) { |
452 | - $file = apcu_fetch($this->apcuPrefix.$class, $hit); |
|
452 | + $file = apcu_fetch($this->apcuPrefix . $class, $hit); |
|
453 | 453 | if ($hit) { |
454 | 454 | return $file; |
455 | 455 | } |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | } |
464 | 464 | |
465 | 465 | if (null !== $this->apcuPrefix) { |
466 | - apcu_add($this->apcuPrefix.$class, $file); |
|
466 | + apcu_add($this->apcuPrefix . $class, $file); |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | if (false === $file) { |
@@ -327,11 +327,11 @@ |
||
327 | 327 | foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { |
328 | 328 | if (isset(self::$installedByVendor[$vendorDir])) { |
329 | 329 | $installed[] = self::$installedByVendor[$vendorDir]; |
330 | - } elseif (is_file($vendorDir.'/composer/installed.php')) { |
|
330 | + } elseif (is_file($vendorDir . '/composer/installed.php')) { |
|
331 | 331 | /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ |
332 | - $required = require $vendorDir.'/composer/installed.php'; |
|
332 | + $required = require $vendorDir . '/composer/installed.php'; |
|
333 | 333 | $installed[] = self::$installedByVendor[$vendorDir] = $required; |
334 | - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { |
|
334 | + if (null === self::$installed && strtr($vendorDir . '/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { |
|
335 | 335 | self::$installed = $installed[count($installed) - 1]; |
336 | 336 | } |
337 | 337 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $loader->register(true); |
35 | 35 | |
36 | 36 | $filesToLoad = \Composer\Autoload\ComposerStaticInit6e0324fc886fd55694e53338d30399bc::$files; |
37 | - $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { |
|
37 | + $requireFile = \Closure::bind(static function($fileIdentifier, $file) { |
|
38 | 38 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
39 | 39 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
40 | 40 |
@@ -49,14 +49,14 @@ discard block |
||
49 | 49 | $resolved = null; |
50 | 50 | |
51 | 51 | return new Promise\Promise( |
52 | - function ($resolve, $reject) use (&$promise, &$resolved, $uri, $connector, $host, $parts) { |
|
52 | + function($resolve, $reject) use (&$promise, &$resolved, $uri, $connector, $host, $parts) { |
|
53 | 53 | // resolve/reject with result of DNS lookup |
54 | - $promise->then(function ($ip) use (&$promise, &$resolved, $uri, $connector, $host, $parts) { |
|
54 | + $promise->then(function($ip) use (&$promise, &$resolved, $uri, $connector, $host, $parts) { |
|
55 | 55 | $resolved = $ip; |
56 | 56 | |
57 | 57 | return $promise = $connector->connect( |
58 | 58 | Connector::uri($parts, $host, $ip) |
59 | - )->then(null, function (\Exception $e) use ($uri) { |
|
59 | + )->then(null, function(\Exception $e) use ($uri) { |
|
60 | 60 | if ($e instanceof \RuntimeException) { |
61 | 61 | $message = \preg_replace('/^(Connection to [^ ]+)[&?]hostname=[^ &]+/', '$1', $e->getMessage()); |
62 | 62 | $e = new \RuntimeException( |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | |
89 | 89 | throw $e; |
90 | 90 | }); |
91 | - }, function ($e) use ($uri, $reject) { |
|
92 | - $reject(new \RuntimeException('Connection to ' . $uri .' failed during DNS lookup: ' . $e->getMessage(), 0, $e)); |
|
91 | + }, function($e) use ($uri, $reject) { |
|
92 | + $reject(new \RuntimeException('Connection to ' . $uri . ' failed during DNS lookup: ' . $e->getMessage(), 0, $e)); |
|
93 | 93 | })->then($resolve, $reject); |
94 | 94 | }, |
95 | - function ($_, $reject) use (&$promise, &$resolved, $uri) { |
|
95 | + function($_, $reject) use (&$promise, &$resolved, $uri) { |
|
96 | 96 | // cancellation should reject connection attempt |
97 | 97 | // reject DNS resolution with custom reason, otherwise rely on connection cancellation below |
98 | 98 | if ($resolved === null) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | { |
58 | 58 | // swap arguments for legacy constructor signature |
59 | 59 | if (($context instanceof LoopInterface || $context === null) && (\func_num_args() <= 1 || \is_array($loop))) { |
60 | - $swap = $loop === null ? array(): $loop; |
|
60 | + $swap = $loop === null ? array() : $loop; |
|
61 | 61 | $loop = $context; |
62 | 62 | $context = $swap; |
63 | 63 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ); |
79 | 79 | |
80 | 80 | if ($context['timeout'] === true) { |
81 | - $context['timeout'] = (float)\ini_get("default_socket_timeout"); |
|
81 | + $context['timeout'] = (float) \ini_get("default_socket_timeout"); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | if ($context['tcp'] instanceof ConnectorInterface) { |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | { |
165 | 165 | $scheme = 'tcp'; |
166 | 166 | if (\strpos($uri, '://') !== false) { |
167 | - $scheme = (string)\substr($uri, 0, \strpos($uri, '://')); |
|
167 | + $scheme = (string) \substr($uri, 0, \strpos($uri, '://')); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | if (!isset($this->connectors[$scheme])) { |
@@ -88,10 +88,10 @@ |
||
88 | 88 | $this->server = $server; |
89 | 89 | |
90 | 90 | $that = $this; |
91 | - $server->on('connection', function (ConnectionInterface $conn) use ($that) { |
|
91 | + $server->on('connection', function(ConnectionInterface $conn) use ($that) { |
|
92 | 92 | $that->emit('connection', array($conn)); |
93 | 93 | }); |
94 | - $server->on('error', function (Exception $error) use ($that) { |
|
94 | + $server->on('error', function(Exception $error) use ($that) { |
|
95 | 95 | $that->emit('error', array($error)); |
96 | 96 | }); |
97 | 97 | } |