Passed
Push — master ( 73fd29...e88e4d )
by Anton
02:32
created
tests/Framework/SnapshotTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
     {
21 21
         $app = $this->makeApp();
22 22
 
23
-        try {
23
+        try{
24 24
             throw new \Error('test error');
25
-        } catch (\Error $e) {
25
+        }catch (\Error $e){
26 26
             /** @var SnapshotInterface $s */
27 27
             $s = $app->get(SnapshotterInterface::class)->register($e);
28 28
         }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,12 @@
 block discarded – undo
20 20
     {
21 21
         $app = $this->makeApp();
22 22
 
23
-        try {
23
+        try
24
+        {
24 25
             throw new \Error('test error');
25
-        } catch (\Error $e) {
26
+        }
27
+        catch (\Error $e)
28
+        {
26 29
             /** @var SnapshotInterface $s */
27 30
             $s = $app->get(SnapshotterInterface::class)->register($e);
28 31
         }
Please login to merge, or discard this patch.
tests/Framework/I18n/ExportTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 {
17 17
     public function testReset(): void
18 18
     {
19
-        $this->assertFileNotExists(__DIR__ . '/messages.ru.php');
19
+        $this->assertFileNotExists(__DIR__.'/messages.ru.php');
20 20
 
21 21
         $this->runCommandDebug('i18n:index');
22 22
         $this->runCommandDebug('configure');
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
             '--fallback' => 'en',
27 27
         ]);
28 28
 
29
-        $this->assertFileExists(__DIR__ . '/messages.ru.php');
29
+        $this->assertFileExists(__DIR__.'/messages.ru.php');
30 30
 
31
-        $exp = (require __DIR__ . '/messages.ru.php');
31
+        $exp = (require __DIR__.'/messages.ru.php');
32 32
 
33 33
         $this->assertArrayHasKey('World', $exp);
34 34
         $this->assertSame('Мир', $exp['World']);
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
         $this->assertArrayHasKey('%s unit|%s units', $exp);
37 37
         $this->assertArrayHasKey('This value is required.', $exp);
38 38
 
39
-        unlink(__DIR__ . '/messages.ru.php');
39
+        unlink(__DIR__.'/messages.ru.php');
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
tests/Framework/GRPC/GenerateTest.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
     public function setUp(): void
34 34
     {
35 35
         exec('protoc 2>&1', $out);
36
-        if (strpos(join("\n", $out), '--php_out') === false) {
36
+        if (strpos(join("\n", $out), '--php_out') === false){
37 37
             $this->markTestSkipped('Protoc binary is missing');
38 38
         }
39 39
 
40 40
         parent::setUp();
41 41
 
42 42
         $fs = new Files();
43
-        $this->proto = $fs->normalizePath($this->app->dir('app') . 'proto/service.proto');
43
+        $this->proto = $fs->normalizePath($this->app->dir('app').'proto/service.proto');
44 44
 
45 45
         // protoc can't figure relative paths
46 46
         $this->proto = str_replace('Framework/../', '', $this->proto);
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 
53 53
         $fs = new Files();
54 54
 
55
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
56
-            $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
55
+        if ($fs->isDirectory($this->app->dir('app').'src/Service')){
56
+            $fs->deleteDirectory($this->app->dir('app').'src/Service');
57 57
         }
58 58
 
59
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
60
-            $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
59
+        if ($fs->isDirectory($this->app->dir('app').'src/GPBMetadata')){
60
+            $fs->deleteDirectory($this->app->dir('app').'src/GPBMetadata');
61 61
         }
62 62
     }
63 63
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
             'proto' => $this->proto
86 86
         ]);
87 87
 
88
-        $this->assertFileExists($this->app->dir('app') . 'src/Service/EchoInterface.php');
89
-        $this->assertFileExists($this->app->dir('app') . 'src/Service/Sub/Message.php');
90
-        $this->assertFileExists($this->app->dir('app') . 'src/GPBMetadata/Service.php');
88
+        $this->assertFileExists($this->app->dir('app').'src/Service/EchoInterface.php');
89
+        $this->assertFileExists($this->app->dir('app').'src/Service/Sub/Message.php');
90
+        $this->assertFileExists($this->app->dir('app').'src/GPBMetadata/Service.php');
91 91
     }
92 92
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@  discard block
 block discarded – undo
33 33
     public function setUp(): void
34 34
     {
35 35
         exec('protoc 2>&1', $out);
36
-        if (strpos(join("\n", $out), '--php_out') === false) {
36
+        if (strpos(join("\n", $out), '--php_out') === false)
37
+        {
37 38
             $this->markTestSkipped('Protoc binary is missing');
38 39
         }
39 40
 
@@ -52,11 +53,13 @@  discard block
 block discarded – undo
52 53
 
53 54
         $fs = new Files();
54 55
 
55
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
56
+        if ($fs->isDirectory($this->app->dir('app') . 'src/Service'))
57
+        {
56 58
             $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
57 59
         }
58 60
 
59
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
61
+        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata'))
62
+        {
60 63
             $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
61 64
         }
62 65
     }
Please login to merge, or discard this patch.
tests/Framework/GRPC/ListTest.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function setUp(): void
21 21
     {
22 22
         exec('protoc 2>&1', $out);
23
-        if (strpos(join("\n", $out), '--php_out') === false) {
23
+        if (strpos(join("\n", $out), '--php_out') === false){
24 24
             $this->markTestSkipped('Protoc binary is missing');
25 25
             return;
26 26
         }
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         parent::setUp();
29 29
 
30 30
         $fs = new Files();
31
-        $this->proto = $fs->normalizePath($this->app->dir('app') . 'proto/service.proto');
31
+        $this->proto = $fs->normalizePath($this->app->dir('app').'proto/service.proto');
32 32
 
33 33
         // protoc can't figure relative paths
34 34
         $this->proto = str_replace('Framework/../', '', $this->proto);
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 
41 41
         $fs = new Files();
42 42
 
43
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
44
-            $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
43
+        if ($fs->isDirectory($this->app->dir('app').'src/Service')){
44
+            $fs->deleteDirectory($this->app->dir('app').'src/Service');
45 45
         }
46 46
 
47
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
48
-            $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
47
+        if ($fs->isDirectory($this->app->dir('app').'src/GPBMetadata')){
48
+            $fs->deleteDirectory($this->app->dir('app').'src/GPBMetadata');
49 49
         }
50 50
     }
51 51
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             'proto' => $this->proto
63 63
         ]);
64 64
 
65
-        file_put_contents($this->app->dir('app') . 'src/Service/EchoService.php', GenerateTest::SERVICE);
65
+        file_put_contents($this->app->dir('app').'src/Service/EchoService.php', GenerateTest::SERVICE);
66 66
 
67 67
         $out = $this->runCommandDebug('grpc:services');
68 68
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@  discard block
 block discarded – undo
20 20
     public function setUp(): void
21 21
     {
22 22
         exec('protoc 2>&1', $out);
23
-        if (strpos(join("\n", $out), '--php_out') === false) {
23
+        if (strpos(join("\n", $out), '--php_out') === false)
24
+        {
24 25
             $this->markTestSkipped('Protoc binary is missing');
25 26
             return;
26 27
         }
@@ -40,11 +41,13 @@  discard block
 block discarded – undo
40 41
 
41 42
         $fs = new Files();
42 43
 
43
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
44
+        if ($fs->isDirectory($this->app->dir('app') . 'src/Service'))
45
+        {
44 46
             $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
45 47
         }
46 48
 
47
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
49
+        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata'))
50
+        {
48 51
             $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
49 52
         }
50 53
     }
Please login to merge, or discard this patch.
tests/Framework/Encrypter/KeyCommandTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function testMountFileNotFound(): void
25 25
     {
26 26
         $out = $this->runCommand('encrypt:key', [
27
-            '-m' => __DIR__ . '/.env'
27
+            '-m' => __DIR__.'/.env'
28 28
         ]);
29 29
 
30 30
         $this->assertContains('Unable to find', $out);
@@ -32,18 +32,18 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function testReplace(): void
34 34
     {
35
-        file_put_contents(__DIR__ . '/.env', '{encrypt-key}');
35
+        file_put_contents(__DIR__.'/.env', '{encrypt-key}');
36 36
 
37 37
         $out = $this->runCommand('encrypt:key', [
38
-            '-m' => __DIR__ . '/.env'
38
+            '-m' => __DIR__.'/.env'
39 39
         ]);
40 40
 
41 41
         $this->assertContains('key has been updated', $out);
42 42
 
43
-        $body = file_get_contents(__DIR__ . '/.env');
43
+        $body = file_get_contents(__DIR__.'/.env');
44 44
         $this->assertContains($body, $out);
45 45
 
46
-        unlink(__DIR__ . '/.env');
46
+        unlink(__DIR__.'/.env');
47 47
     }
48 48
 
49 49
     public function testReplaceCurrent(): void
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
             'ENCRYPTER_KEY' => $key
55 55
         ]);
56 56
 
57
-        file_put_contents(__DIR__ . '/.env', $key);
57
+        file_put_contents(__DIR__.'/.env', $key);
58 58
 
59 59
         $out = $app->console()->run('encrypt:key', [
60
-            '-m' => __DIR__ . '/.env'
60
+            '-m' => __DIR__.'/.env'
61 61
         ]);
62 62
         $out = $out->getOutput()->fetch();
63 63
 
64 64
         $this->assertContains('key has been updated', $out);
65 65
 
66
-        $body = file_get_contents(__DIR__ . '/.env');
66
+        $body = file_get_contents(__DIR__.'/.env');
67 67
         $this->assertContains($body, $out);
68 68
 
69
-        unlink(__DIR__ . '/.env');
69
+        unlink(__DIR__.'/.env');
70 70
     }
71 71
 }
Please login to merge, or discard this patch.
tests/Framework/Module/PublishTest.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 
16 16
 class PublishTest extends ConsoleTest
17 17
 {
18
-    protected const TEST_FILE   = __DIR__ . '/test.txt';
19
-    protected const TEST_FILE_2 = __DIR__ . '/PublishTest.php';
18
+    protected const TEST_FILE   = __DIR__.'/test.txt';
19
+    protected const TEST_FILE_2 = __DIR__.'/PublishTest.php';
20 20
 
21 21
     public function tearDown(): void
22 22
     {
23
-        if (file_exists(self::TEST_FILE)) {
23
+        if (file_exists(self::TEST_FILE)){
24 24
             unlink(self::TEST_FILE);
25 25
         }
26 26
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $this->runCommandDebug('publish', [
177 177
             'type'   => 'replace',
178 178
             'target' => '@runtime',
179
-            'source' => __DIR__ . '/*',
179
+            'source' => __DIR__.'/*',
180 180
             'mode'   => 'runtime'
181 181
         ]);
182 182
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $this->runCommandDebug('publish', [
195 195
             'type'   => 'follow',
196 196
             'target' => '@runtime',
197
-            'source' => __DIR__ . '/*',
197
+            'source' => __DIR__.'/*',
198 198
             'mode'   => 'runtime'
199 199
         ]);
200 200
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $this->runCommandDebug('publish', [
213 213
             'type'   => 'follow',
214 214
             'target' => '@runtime/test.txt',
215
-            'source' => self::TEST_FILE . 'invalid',
215
+            'source' => self::TEST_FILE.'invalid',
216 216
             'mode'   => 'runtime'
217 217
         ]);
218 218
     }
@@ -227,13 +227,13 @@  discard block
 block discarded – undo
227 227
         $this->runCommandDebug('publish', [
228 228
             'type'   => 'follow',
229 229
             'target' => '@runtime/test.txt',
230
-            'source' => self::TEST_FILE . 'invalid/*',
230
+            'source' => self::TEST_FILE.'invalid/*',
231 231
             'mode'   => 'runtime'
232 232
         ]);
233 233
     }
234 234
 
235 235
     protected function file(string $dir, string $name)
236 236
     {
237
-        return $this->app->get(DirectoriesInterface::class)->get($dir) . $name;
237
+        return $this->app->get(DirectoriesInterface::class)->get($dir).$name;
238 238
     }
239 239
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
 
21 21
     public function tearDown(): void
22 22
     {
23
-        if (file_exists(self::TEST_FILE)) {
23
+        if (file_exists(self::TEST_FILE))
24
+        {
24 25
             unlink(self::TEST_FILE);
25 26
         }
26 27
 
Please login to merge, or discard this patch.
tests/app/src/Bootloader/AppBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
         $router->setDefault($route->withDefaults(['name' => 'Dave']));
45 45
 
46
-        $views->addDirectory('custom', __DIR__ . '/../../views/custom/');
46
+        $views->addDirectory('custom', __DIR__.'/../../views/custom/');
47 47
         $views->addEngine(TestEngine::class);
48 48
 
49 49
         $validation->addAlias('aliased', 'notEmpty');
Please login to merge, or discard this patch.
tests/app/src/ViewEngine/TestEngine.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
     public function compile(string $path, ContextInterface $context): void
33 33
     {
34
-        if ($path == 'custom:error') {
34
+        if ($path == 'custom:error'){
35 35
             throw new EngineException('Unable to compile custom:error');
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
 
32 32
     public function compile(string $path, ContextInterface $context): void
33 33
     {
34
-        if ($path == 'custom:error') {
34
+        if ($path == 'custom:error')
35
+        {
35 36
             throw new EngineException('Unable to compile custom:error');
36 37
         }
37 38
     }
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,4 +12,4 @@
 block discarded – undo
12 12
 ini_set('display_errors', '1');
13 13
 
14 14
 //Composer
15
-require dirname(__DIR__) . '/vendor/autoload.php';
15
+require dirname(__DIR__).'/vendor/autoload.php';
Please login to merge, or discard this patch.