@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | $output = $this->runCommand('php:extensions'); |
18 | 18 | |
19 | - foreach (get_loaded_extensions() as $extension) { |
|
19 | + foreach (get_loaded_extensions() as $extension){ |
|
20 | 20 | $this->assertContains($extension, $output); |
21 | 21 | } |
22 | 22 | } |
@@ -31,12 +31,12 @@ |
||
31 | 31 | |
32 | 32 | $fs = new Files(); |
33 | 33 | |
34 | - if ($fs->isDirectory(__DIR__ . '/../app/migrations')) { |
|
35 | - $fs->deleteDirectory(__DIR__ . '/../app/migrations'); |
|
34 | + if ($fs->isDirectory(__DIR__.'/../app/migrations')){ |
|
35 | + $fs->deleteDirectory(__DIR__.'/../app/migrations'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | $runtime = $this->app->get(DirectoriesInterface::class)->get('runtime'); |
39 | - if ($fs->isDirectory($runtime)) { |
|
39 | + if ($fs->isDirectory($runtime)){ |
|
40 | 40 | $fs->deleteDirectory($runtime); |
41 | 41 | } |
42 | 42 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | $dirs = $this->app->get(DirectoriesInterface::class); |
38 | 38 | $fs = $this->app->get(FilesInterface::class); |
39 | - $fs->write($dirs->get('cache') . '/views/test.php', 'test', null, true); |
|
39 | + $fs->write($dirs->get('cache').'/views/test.php', 'test', null, true); |
|
40 | 40 | |
41 | 41 | $out = $this->runCommandDebug('views:reset'); |
42 | 42 | $this->assertContains('test.php', $out); |
@@ -38,15 +38,15 @@ |
||
38 | 38 | public function getServices(): array |
39 | 39 | { |
40 | 40 | $result = []; |
41 | - foreach ($this->classes->getClasses(ServiceInterface::class) as $service) { |
|
42 | - if (!$service->isInstantiable()) { |
|
41 | + foreach ($this->classes->getClasses(ServiceInterface::class) as $service){ |
|
42 | + if (!$service->isInstantiable()){ |
|
43 | 43 | continue; |
44 | 44 | } |
45 | 45 | |
46 | 46 | $instance = $this->container->get($service->getName()); |
47 | 47 | |
48 | - foreach ($service->getInterfaces() as $interface) { |
|
49 | - if ($interface->isSubclassOf(ServiceInterface::class)) { |
|
48 | + foreach ($service->getInterfaces() as $interface){ |
|
49 | + if ($interface->isSubclassOf(ServiceInterface::class)){ |
|
50 | 50 | $result[$interface->getName()] = $instance; |
51 | 51 | } |
52 | 52 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | string $clientFilename = null, |
27 | 27 | string $clientMediaType = null |
28 | 28 | ): UploadedFileInterface { |
29 | - if ($size === null) { |
|
29 | + if ($size === null){ |
|
30 | 30 | $size = $stream->getSize(); |
31 | 31 | } |
32 | 32 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $response = new Response('php://memory', $code, []); |
38 | 38 | $response = $response->withStatus($code, $reasonPhrase); |
39 | 39 | |
40 | - foreach ($this->config->getBaseHeaders() as $header => $value) { |
|
40 | + foreach ($this->config->getBaseHeaders() as $header => $value){ |
|
41 | 41 | $response = $response->withAddedHeader($header, $value); |
42 | 42 | } |
43 | 43 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | |
67 | 67 | $kernel->addDispatcher($factory->make(SapiDispatcher::class)); |
68 | 68 | |
69 | - if (class_exists(PSR7Client::class)) { |
|
69 | + if (class_exists(PSR7Client::class)){ |
|
70 | 70 | $kernel->addDispatcher($factory->make(RrDispacher::class)); |
71 | 71 | } |
72 | 72 | } |
@@ -40,21 +40,21 @@ discard block |
||
40 | 40 | { |
41 | 41 | $conn = $env->get('RR_RPC', static::RPC_DEFAULT); |
42 | 42 | |
43 | - if (!preg_match('#^([a-z]+)://([^:]+):?(\d+)?$#i', $conn, $parts)) { |
|
43 | + if (!preg_match('#^([a-z]+)://([^:]+):?(\d+)?$#i', $conn, $parts)){ |
|
44 | 44 | throw new BootException( |
45 | 45 | "Unable to configure RPC connection, invalid DSN given `{$conn}`." |
46 | 46 | ); |
47 | 47 | } |
48 | 48 | |
49 | - if (!in_array($parts[1], ['tcp', 'unix'])) { |
|
49 | + if (!in_array($parts[1], ['tcp', 'unix'])){ |
|
50 | 50 | throw new BootException( |
51 | 51 | "Unable to configure RPC connection, invalid DSN given `{$conn}`." |
52 | 52 | ); |
53 | 53 | } |
54 | 54 | |
55 | - if ($parts[1] == 'unix') { |
|
55 | + if ($parts[1] == 'unix'){ |
|
56 | 56 | $relay = new SocketRelay($parts[2], null, SocketRelay::SOCK_UNIX); |
57 | - } else { |
|
57 | + }else{ |
|
58 | 58 | $relay = new SocketRelay($parts[2], (int)$parts[3], SocketRelay::SOCK_TCP); |
59 | 59 | } |
60 | 60 | |
@@ -69,25 +69,25 @@ discard block |
||
69 | 69 | { |
70 | 70 | $conn = $env->get('RR_RELAY', static::WORKER_DEFAULT); |
71 | 71 | |
72 | - if ($conn === 'pipes' || empty($conn)) { |
|
72 | + if ($conn === 'pipes' || empty($conn)){ |
|
73 | 73 | return new Worker(new StreamRelay(STDIN, STDOUT)); |
74 | 74 | } |
75 | 75 | |
76 | - if (!preg_match('#^([a-z]+)://([^:]+):?(\d+)?$#i', $conn, $parts)) { |
|
76 | + if (!preg_match('#^([a-z]+)://([^:]+):?(\d+)?$#i', $conn, $parts)){ |
|
77 | 77 | throw new BootException( |
78 | 78 | "Unable to configure Worker connection, invalid DSN given `{$conn}`." |
79 | 79 | ); |
80 | 80 | } |
81 | 81 | |
82 | - if (!in_array($parts[1], ['tcp', 'unix'])) { |
|
82 | + if (!in_array($parts[1], ['tcp', 'unix'])){ |
|
83 | 83 | throw new BootException( |
84 | 84 | "Unable to configure Worker connection, invalid DSN given `{$conn}`." |
85 | 85 | ); |
86 | 86 | } |
87 | 87 | |
88 | - if ($parts[1] == 'unix') { |
|
88 | + if ($parts[1] == 'unix'){ |
|
89 | 89 | $relay = new SocketRelay($parts[2], null, SocketRelay::SOCK_UNIX); |
90 | - } else { |
|
90 | + }else{ |
|
91 | 91 | $relay = new SocketRelay($parts[2], (int)$parts[3], SocketRelay::SOCK_TCP); |
92 | 92 | } |
93 | 93 |
@@ -17,10 +17,10 @@ |
||
17 | 17 | public function makeApp(array $env = []): TestApp |
18 | 18 | { |
19 | 19 | return TestApp::init([ |
20 | - 'root' => __DIR__ . '/../..', |
|
21 | - 'app' => __DIR__ . '/../app', |
|
22 | - 'runtime' => sys_get_temp_dir() . '/spiral', |
|
23 | - 'cache' => sys_get_temp_dir() . '/spiral', |
|
20 | + 'root' => __DIR__.'/../..', |
|
21 | + 'app' => __DIR__.'/../app', |
|
22 | + 'runtime' => sys_get_temp_dir().'/spiral', |
|
23 | + 'cache' => sys_get_temp_dir().'/spiral', |
|
24 | 24 | ], new Environment($env), false); |
25 | 25 | } |
26 | 26 | } |