Passed
Push — master ( beb5fc...4d9ea0 )
by Anton
02:12
created
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
 }
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.
src/Bootloader/Security/ValidationBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
             ]
104 104
         ]);
105 105
 
106
-        $tokenizer->addDirectory(directory('vendor') . 'spiral/validation/src/');
106
+        $tokenizer->addDirectory(directory('vendor').'spiral/validation/src/');
107 107
     }
108 108
 
109 109
     /**
Please login to merge, or discard this patch.
src/Bootloader/I18nBootloader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 block discarded – undo
58 58
      */
59 59
     public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs)
60 60
     {
61
-        if (!$dirs->has('locale')) {
62
-            $dirs->set('locale', $dirs->get('app') . 'locale/');
61
+        if (!$dirs->has('locale')){
62
+            $dirs->set('locale', $dirs->get('app').'locale/');
63 63
         }
64 64
 
65 65
         $this->config->setDefaults('translator', [
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,8 @@
 block discarded – undo
58 58
      */
59 59
     public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs)
60 60
     {
61
-        if (!$dirs->has('locale')) {
61
+        if (!$dirs->has('locale'))
62
+        {
62 63
             $dirs->set('locale', $dirs->get('app') . 'locale/');
63 64
         }
64 65
 
Please login to merge, or discard this patch.
src/Bootloader/Views/ViewsBootloader.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs)
44 44
     {
45
-        if (!$dirs->has('views')) {
46
-            $dirs->set('views', $dirs->get('app') . 'views');
45
+        if (!$dirs->has('views')){
46
+            $dirs->set('views', $dirs->get('app').'views');
47 47
         }
48 48
 
49 49
         // default view config
50 50
         $this->config->setDefaults('views', [
51 51
             'cache'        => [
52 52
                 'enabled'   => !$env->get('DEBUG', false),
53
-                'directory' => $dirs->get('cache') . 'views'
53
+                'directory' => $dirs->get('cache').'views'
54 54
             ],
55 55
             'namespaces'   => [
56 56
                 'default' => [$dirs->get('views')]
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function addDirectory(string $namespace, string $directory)
68 68
     {
69
-        if (!isset($this->config->getConfig('views')['namespaces'][$namespace])) {
69
+        if (!isset($this->config->getConfig('views')['namespaces'][$namespace])){
70 70
             $this->config->modify('views', new Append('namespaces', $namespace, []));
71 71
         }
72 72
 
73
-        $this->config->modify('views', new Append('namespaces.' . $namespace, null, $directory));
73
+        $this->config->modify('views', new Append('namespaces.'.$namespace, null, $directory));
74 74
     }
75 75
 
76 76
     /**
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function boot(EnvironmentInterface $env, DirectoriesInterface $dirs)
44 44
     {
45
-        if (!$dirs->has('views')) {
45
+        if (!$dirs->has('views'))
46
+        {
46 47
             $dirs->set('views', $dirs->get('app') . 'views');
47 48
         }
48 49
 
@@ -66,7 +67,8 @@  discard block
 block discarded – undo
66 67
      */
67 68
     public function addDirectory(string $namespace, string $directory)
68 69
     {
69
-        if (!isset($this->config->getConfig('views')['namespaces'][$namespace])) {
70
+        if (!isset($this->config->getConfig('views')['namespaces'][$namespace]))
71
+        {
70 72
             $this->config->modify('views', new Append('namespaces', $namespace, []));
71 73
         }
72 74
 
Please login to merge, or discard this patch.
src/Bootloader/Database/DisconnectsBootloader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         $finalizer->addFinalizer(function () use ($container) {
29 29
             /** @var DatabaseManager $dbal */
30 30
             $dbal = $container->get(DatabaseManager::class);
31
-            foreach ($dbal->getDrivers() as $driver) {
31
+            foreach ($dbal->getDrivers() as $driver){
32 32
                 $driver->disconnect();
33 33
             }
34 34
         });
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,10 +25,12 @@
 block discarded – undo
25 25
      */
26 26
     public function boot(FinalizerInterface $finalizer, ContainerInterface $container)
27 27
     {
28
-        $finalizer->addFinalizer(function () use ($container) {
28
+        $finalizer->addFinalizer(function () use ($container)
29
+        {
29 30
             /** @var DatabaseManager $dbal */
30 31
             $dbal = $container->get(DatabaseManager::class);
31
-            foreach ($dbal->getDrivers() as $driver) {
32
+            foreach ($dbal->getDrivers() as $driver)
33
+            {
32 34
                 $driver->disconnect();
33 35
             }
34 36
         });
Please login to merge, or discard this patch.