Passed
Push — master ( bc79a5...b222de )
by Anton
02:01
created
tests/Framework/Framework/ExtensionsCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,8 @@
 block discarded – undo
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 21
             $this->assertContains($extension, $output);
21 22
         }
22 23
     }
Please login to merge, or discard this patch.
tests/Framework/ConsoleTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,12 +31,14 @@
 block discarded – undo
31 31
 
32 32
         $fs = new Files();
33 33
 
34
-        if ($fs->isDirectory(__DIR__ . '/../app/migrations')) {
34
+        if ($fs->isDirectory(__DIR__ . '/../app/migrations'))
35
+        {
35 36
             $fs->deleteDirectory(__DIR__ . '/../app/migrations');
36 37
         }
37 38
 
38 39
         $runtime = $this->app->get(DirectoriesInterface::class)->get('runtime');
39
-        if ($fs->isDirectory($runtime)) {
40
+        if ($fs->isDirectory($runtime))
41
+        {
40 42
             $fs->deleteDirectory($runtime);
41 43
         }
42 44
     }
Please login to merge, or discard this patch.
tests/Framework/Views/CompileTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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);
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
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 {
16 16
     public function testReset()
17 17
     {
18
-        $this->assertFileNotExists(__DIR__ . '/messages.ru.php');
18
+        $this->assertFileNotExists(__DIR__.'/messages.ru.php');
19 19
 
20 20
         $this->runCommandDebug('i18n:index');
21 21
         $this->runCommandDebug('configure');
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
             '--fallback' => 'en',
26 26
         ]);
27 27
 
28
-        $this->assertFileExists(__DIR__ . '/messages.ru.php');
28
+        $this->assertFileExists(__DIR__.'/messages.ru.php');
29 29
 
30
-        $exp = (require __DIR__ . '/messages.ru.php');
30
+        $exp = (require __DIR__.'/messages.ru.php');
31 31
 
32 32
         $this->assertArrayHasKey('World', $exp);
33 33
         $this->assertSame('Мир', $exp['World']);
@@ -35,6 +35,6 @@  discard block
 block discarded – undo
35 35
         $this->assertArrayHasKey('%s unit|%s units', $exp);
36 36
         $this->assertArrayHasKey('This value is required.', $exp);
37 37
 
38
-        unlink(__DIR__ . '/messages.ru.php');
38
+        unlink(__DIR__.'/messages.ru.php');
39 39
     }
40 40
 }
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Framework/SnapshotTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
     {
18 18
         $app = $this->makeApp();
19 19
 
20
-        try {
20
+        try{
21 21
             throw new \Error("test error");
22
-        } catch (\Error $e) {
22
+        }catch (\Error $e){
23 23
             /** @var SnapshotInterface $s */
24 24
             $s = $app->get(SnapshotterInterface::class)->register($e);
25 25
         }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,12 @@
 block discarded – undo
17 17
     {
18 18
         $app = $this->makeApp();
19 19
 
20
-        try {
20
+        try
21
+        {
21 22
             throw new \Error("test error");
22
-        } catch (\Error $e) {
23
+        }
24
+        catch (\Error $e)
25
+        {
23 26
             /** @var SnapshotInterface $s */
24 27
             $s = $app->get(SnapshotterInterface::class)->register($e);
25 28
         }
Please login to merge, or discard this patch.
tests/Framework/Http/SessionTest.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 {
16 16
     public function testNotSidWhenNotStarted()
17 17
     {
18
-        $this->http->setHandler(function () {
18
+        $this->http->setHandler(function (){
19 19
             $this->assertTrue($this->app->getContainer()->has(SessionInterface::class));
20 20
 
21 21
             return 'all good';
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function testSetSid()
32 32
     {
33
-        $this->http->setHandler(function () {
33
+        $this->http->setHandler(function (){
34 34
             return ++$this->session()->getSection('cli')->value;
35 35
         });
36 36
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function testSessionResume()
46 46
     {
47
-        $this->http->setHandler(function () {
47
+        $this->http->setHandler(function (){
48 48
             return ++$this->session()->getSection('cli')->value;
49 49
         });
50 50
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
     public function testSessionRegenerateId()
70 70
     {
71
-        $this->http->setHandler(function () {
71
+        $this->http->setHandler(function (){
72 72
             return ++$this->session()->getSection('cli')->value;
73 73
         });
74 74
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $this->assertSame(200, $result->getStatusCode());
87 87
         $this->assertSame('2', $result->getBody()->__toString());
88 88
 
89
-        $this->http->setHandler(function () {
89
+        $this->http->setHandler(function (){
90 90
             $this->session()->regenerateID(false);
91 91
 
92 92
             return ++$this->session()->getSection('cli')->value;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
     public function testDestroySession()
107 107
     {
108
-        $this->http->setHandler(function () {
108
+        $this->http->setHandler(function (){
109 109
             $this->assertInternalType('array', $this->session()->__debugInfo());
110 110
 
111 111
             return ++$this->session()->getSection('cli')->value;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         ]);
121 121
         $this->assertSame(200, $result->getStatusCode());
122 122
         $this->assertSame('2', $result->getBody()->__toString());
123
-        $this->http->setHandler(function () {
123
+        $this->http->setHandler(function (){
124 124
             $this->session()->destroy();
125 125
             $this->assertFalse($this->session()->isStarted());
126 126
 
Please login to merge, or discard this patch.
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@  discard block
 block discarded – undo
15 15
 {
16 16
     public function testNotSidWhenNotStarted()
17 17
     {
18
-        $this->http->setHandler(function () {
18
+        $this->http->setHandler(function ()
19
+        {
19 20
             $this->assertTrue($this->app->getContainer()->has(SessionInterface::class));
20 21
 
21 22
             return 'all good';
@@ -30,7 +31,8 @@  discard block
 block discarded – undo
30 31
 
31 32
     public function testSetSid()
32 33
     {
33
-        $this->http->setHandler(function () {
34
+        $this->http->setHandler(function ()
35
+        {
34 36
             return ++$this->session()->getSection('cli')->value;
35 37
         });
36 38
 
@@ -44,7 +46,8 @@  discard block
 block discarded – undo
44 46
 
45 47
     public function testSessionResume()
46 48
     {
47
-        $this->http->setHandler(function () {
49
+        $this->http->setHandler(function ()
50
+        {
48 51
             return ++$this->session()->getSection('cli')->value;
49 52
         });
50 53
 
@@ -68,7 +71,8 @@  discard block
 block discarded – undo
68 71
 
69 72
     public function testSessionRegenerateId()
70 73
     {
71
-        $this->http->setHandler(function () {
74
+        $this->http->setHandler(function ()
75
+        {
72 76
             return ++$this->session()->getSection('cli')->value;
73 77
         });
74 78
 
@@ -86,7 +90,8 @@  discard block
 block discarded – undo
86 90
         $this->assertSame(200, $result->getStatusCode());
87 91
         $this->assertSame('2', $result->getBody()->__toString());
88 92
 
89
-        $this->http->setHandler(function () {
93
+        $this->http->setHandler(function ()
94
+        {
90 95
             $this->session()->regenerateID(false);
91 96
 
92 97
             return ++$this->session()->getSection('cli')->value;
@@ -105,7 +110,8 @@  discard block
 block discarded – undo
105 110
 
106 111
     public function testDestroySession()
107 112
     {
108
-        $this->http->setHandler(function () {
113
+        $this->http->setHandler(function ()
114
+        {
109 115
             $this->assertInternalType('array', $this->session()->__debugInfo());
110 116
 
111 117
             return ++$this->session()->getSection('cli')->value;
@@ -120,7 +126,8 @@  discard block
 block discarded – undo
120 126
         ]);
121 127
         $this->assertSame(200, $result->getStatusCode());
122 128
         $this->assertSame('2', $result->getBody()->__toString());
123
-        $this->http->setHandler(function () {
129
+        $this->http->setHandler(function ()
130
+        {
124 131
             $this->session()->destroy();
125 132
             $this->assertFalse($this->session()->isStarted());
126 133
 
Please login to merge, or discard this patch.
tests/Framework/Module/PublishTest.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@
 block discarded – undo
19 19
 
20 20
     public function tearDown()
21 21
     {
22
-        if (file_exists(self::TEST_FILE)) {
22
+        if (file_exists(self::TEST_FILE))
23
+        {
23 24
             unlink(self::TEST_FILE);
24 25
         }
25 26
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
14 14
 
15 15
 class PublishTest extends ConsoleTest
16 16
 {
17
-    protected const TEST_FILE   = __DIR__ . '/test.txt';
18
-    protected const TEST_FILE_2 = __DIR__ . '/PublishTest.php';
17
+    protected const TEST_FILE   = __DIR__.'/test.txt';
18
+    protected const TEST_FILE_2 = __DIR__.'/PublishTest.php';
19 19
 
20 20
     public function tearDown()
21 21
     {
22
-        if (file_exists(self::TEST_FILE)) {
22
+        if (file_exists(self::TEST_FILE)){
23 23
             unlink(self::TEST_FILE);
24 24
         }
25 25
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $this->runCommandDebug('publish', [
176 176
             'type'   => 'replace',
177 177
             'target' => '@runtime',
178
-            'source' => __DIR__ . '/*',
178
+            'source' => __DIR__.'/*',
179 179
             'mode'   => 'runtime'
180 180
         ]);
181 181
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         $this->runCommandDebug('publish', [
194 194
             'type'   => 'follow',
195 195
             'target' => '@runtime',
196
-            'source' => __DIR__ . '/*',
196
+            'source' => __DIR__.'/*',
197 197
             'mode'   => 'runtime'
198 198
         ]);
199 199
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $this->runCommandDebug('publish', [
212 212
             'type'   => 'follow',
213 213
             'target' => '@runtime/test.txt',
214
-            'source' => self::TEST_FILE . 'invalid',
214
+            'source' => self::TEST_FILE.'invalid',
215 215
             'mode'   => 'runtime'
216 216
         ]);
217 217
     }
@@ -226,13 +226,13 @@  discard block
 block discarded – undo
226 226
         $this->runCommandDebug('publish', [
227 227
             'type'   => 'follow',
228 228
             'target' => '@runtime/test.txt',
229
-            'source' => self::TEST_FILE . 'invalid/*',
229
+            'source' => self::TEST_FILE.'invalid/*',
230 230
             'mode'   => 'runtime'
231 231
         ]);
232 232
     }
233 233
 
234 234
     protected function file(string $dir, string $name)
235 235
     {
236
-        return $this->app->get(DirectoriesInterface::class)->get($dir) . $name;
236
+        return $this->app->get(DirectoriesInterface::class)->get($dir).$name;
237 237
     }
238 238
 }
239 239
\ No newline at end of file
Please login to merge, or discard this patch.
tests/app/src/Controller/TestController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     public function inputAction(RequestInput $i)
38 38
     {
39
-        return 'value: ' . $i->withPrefix('section')->getValue('query', 'value');
39
+        return 'value: '.$i->withPrefix('section')->getValue('query', 'value');
40 40
     }
41 41
 
42 42
     public function errorAction()
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
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function compile(string $path, ContextInterface $context)
22 22
     {
23
-        if ($path == 'custom:error') {
23
+        if ($path == 'custom:error'){
24 24
             throw new EngineException("Unable to compile custom:error");
25 25
         }
26 26
     }
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 compile(string $path, ContextInterface $context)
22 22
     {
23
-        if ($path == 'custom:error') {
23
+        if ($path == 'custom:error')
24
+        {
24 25
             throw new EngineException("Unable to compile custom:error");
25 26
         }
26 27
     }
Please login to merge, or discard this patch.