Passed
Pull Request — master (#1186)
by Abdul Malik
10:33
created
src/Boot/tests/Fixtures/TestCore.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,13 @@
 block discarded – undo
43 43
      */
44 44
     protected function mapDirectories(array $directories): array
45 45
     {
46
-        if (!isset($directories['root'])) {
46
+        if (!isset($directories['root']))
47
+        {
47 48
             throw new BootException('Missing required directory `root`.');
48 49
         }
49 50
 
50
-        if (!isset($directories['app'])) {
51
+        if (!isset($directories['app']))
52
+        {
51 53
             $directories['app'] = $directories['root'] . '/app/';
52 54
         }
53 55
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,25 +43,25 @@
 block discarded – undo
43 43
      */
44 44
     protected function mapDirectories(array $directories): array
45 45
     {
46
-        if (!isset($directories['root'])) {
46
+        if (!isset($directories['root'])){
47 47
             throw new BootException('Missing required directory `root`.');
48 48
         }
49 49
 
50
-        if (!isset($directories['app'])) {
51
-            $directories['app'] = $directories['root'] . '/app/';
50
+        if (!isset($directories['app'])){
51
+            $directories['app'] = $directories['root'].'/app/';
52 52
         }
53 53
 
54 54
         return array_merge([
55 55
             // public root
56
-            'public'    => $directories['root'] . '/public/',
56
+            'public'    => $directories['root'].'/public/',
57 57
 
58 58
             // data directories
59
-            'runtime'   => $directories['root'] . '/runtime/',
60
-            'cache'     => $directories['root'] . '/runtime/cache/',
59
+            'runtime'   => $directories['root'].'/runtime/',
60
+            'cache'     => $directories['root'].'/runtime/cache/',
61 61
 
62 62
             // application directories
63
-            'config'    => $directories['app'] . '/config/',
64
-            'resources' => $directories['app'] . '/resources/',
63
+            'config'    => $directories['app'].'/config/',
64
+            'resources' => $directories['app'].'/resources/',
65 65
         ], $directories);
66 66
     }
67 67
 
Please login to merge, or discard this patch.
src/Boot/tests/DirectoriesTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 
33 33
         $this->assertDir(__DIR__, $dirs->get('root'));
34 34
 
35
-        $this->assertDir(__DIR__ . '/app', $dirs->get('app'));
35
+        $this->assertDir(__DIR__.'/app', $dirs->get('app'));
36 36
 
37
-        $this->assertDir(__DIR__ . '/public', $dirs->get('public'));
37
+        $this->assertDir(__DIR__.'/public', $dirs->get('public'));
38 38
 
39
-        $this->assertDir(__DIR__ . '/app/config', $dirs->get('config'));
40
-        $this->assertDir(__DIR__ . '/app/resources', $dirs->get('resources'));
39
+        $this->assertDir(__DIR__.'/app/config', $dirs->get('config'));
40
+        $this->assertDir(__DIR__.'/app/resources', $dirs->get('resources'));
41 41
 
42
-        $this->assertDir(__DIR__ . '/runtime', $dirs->get('runtime'));
43
-        $this->assertDir(__DIR__ . '/runtime/cache', $dirs->get('cache'));
42
+        $this->assertDir(__DIR__.'/runtime', $dirs->get('runtime'));
43
+        $this->assertDir(__DIR__.'/runtime/cache', $dirs->get('cache'));
44 44
     }
45 45
 
46 46
     public function testKernelException(): void
@@ -101,6 +101,6 @@  discard block
 block discarded – undo
101 101
     private function assertDir($path, $value): void
102 102
     {
103 103
         $path = str_replace(['\\', '//'], '/', $path);
104
-        $this->assertSame(rtrim($path, '/') . '/', $value);
104
+        $this->assertSame(rtrim($path, '/').'/', $value);
105 105
     }
106 106
 }
Please login to merge, or discard this patch.
src/Console/tests/Fixtures/AnotherFailedCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
      */
23 23
     public function perform(): void
24 24
     {
25
-        throw new Exception('Unhandled another failed command error at ' . __METHOD__ . ' (line ' . __LINE__ . ')');
25
+        throw new Exception('Unhandled another failed command error at '.__METHOD__.' (line '.__LINE__.')');
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
src/Console/tests/Fixtures/FailedCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
      */
23 23
     public function perform(): void
24 24
     {
25
-        throw new Exception('Unhandled failed command error at ' . __METHOD__ . ' (line ' . __LINE__ . ')');
25
+        throw new Exception('Unhandled failed command error at '.__METHOD__.' (line '.__LINE__.')');
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
src/Console/tests/Fixtures/HelperCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function perform(): void
28 28
     {
29
-        switch ($this->argument('helper')) {
29
+        switch ($this->argument('helper')){
30 30
             case 'verbose':
31 31
                 $this->write($this->isVerbose() ? 'true' : 'false');
32 32
                 break;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@
 block discarded – undo
26 26
 
27 27
     public function perform(): void
28 28
     {
29
-        switch ($this->argument('helper')) {
29
+        switch ($this->argument('helper'))
30
+        {
30 31
             case 'verbose':
31 32
                 $this->write($this->isVerbose() ? 'true' : 'false');
32 33
                 break;
Please login to merge, or discard this patch.
src/Http/tests/AcceptHeaderTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $headers = $acceptHeader->getAll();
119 119
         $this->assertCount(count($expected), $headers);
120 120
 
121
-        foreach ($expected as $i => $value) {
121
+        foreach ($expected as $i => $value){
122 122
             $this->assertSame($value, $headers[$i]->getValue());
123 123
         }
124 124
     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $headers = $acceptHeader->getAll();
165 165
         $this->assertCount(count($expected), $headers);
166 166
 
167
-        foreach ($expected as $i => $value) {
167
+        foreach ($expected as $i => $value){
168 168
             $this->assertSame($value, (string)$headers[$i]);
169 169
         }
170 170
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,8 @@  discard block
 block discarded – undo
118 118
         $headers = $acceptHeader->getAll();
119 119
         $this->assertCount(count($expected), $headers);
120 120
 
121
-        foreach ($expected as $i => $value) {
121
+        foreach ($expected as $i => $value)
122
+        {
122 123
             $this->assertSame($value, $headers[$i]->getValue());
123 124
         }
124 125
     }
@@ -164,7 +165,8 @@  discard block
 block discarded – undo
164 165
         $headers = $acceptHeader->getAll();
165 166
         $this->assertCount(count($expected), $headers);
166 167
 
167
-        foreach ($expected as $i => $value) {
168
+        foreach ($expected as $i => $value)
169
+        {
168 170
             $this->assertSame($value, (string)$headers[$i]);
169 171
         }
170 172
     }
Please login to merge, or discard this patch.
src/Http/tests/ServerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $this->container->bind(ServerRequestInterface::class, $request);
165 165
 
166 166
         $this->assertSame(
167
-            ['PATH' => 'sample',],
167
+            ['PATH' => 'sample', ],
168 168
             $this->input->server->__debugInfo()
169 169
         );
170 170
     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $this->container->bind(ServerRequestInterface::class, $request);
179 179
 
180 180
         $this->assertSame(
181
-            ['PATH' => 'sample',],
181
+            ['PATH' => 'sample', ],
182 182
             iterator_to_array($this->input->server)
183 183
         );
184 184
     }
Please login to merge, or discard this patch.
src/Cookies/tests/CookieTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,9 +127,9 @@
 block discarded – undo
127 127
         $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite);
128 128
         $this->assertSame($expected, $cookie->getSameSite());
129 129
 
130
-        if ($expected === null) {
130
+        if ($expected === null){
131 131
             $this->assertStringNotContainsString('SameSite=', $cookie->createHeader());
132
-        } else {
132
+        }else{
133 133
             $this->assertStringContainsString("SameSite=$expected", $cookie->createHeader());
134 134
         }
135 135
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,9 +127,12 @@
 block discarded – undo
127 127
         $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite);
128 128
         $this->assertSame($expected, $cookie->getSameSite());
129 129
 
130
-        if ($expected === null) {
130
+        if ($expected === null)
131
+        {
131 132
             $this->assertStringNotContainsString('SameSite=', $cookie->createHeader());
132
-        } else {
133
+        }
134
+        else
135
+        {
133 136
             $this->assertStringContainsString("SameSite=$expected", $cookie->createHeader());
134 137
         }
135 138
     }
Please login to merge, or discard this patch.
src/Auth/tests/Stub/TestAuthProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 {
19 19
     public function getActor(TokenInterface $token): ?object
20 20
     {
21
-        if ($token->getPayload()['ok']) {
21
+        if ($token->getPayload()['ok']){
22 22
             return new \stdClass();
23 23
         }
24 24
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@
 block discarded – undo
18 18
 {
19 19
     public function getActor(TokenInterface $token): ?object
20 20
     {
21
-        if ($token->getPayload()['ok']) {
21
+        if ($token->getPayload()['ok'])
22
+        {
22 23
             return new \stdClass();
23 24
         }
24 25
 
Please login to merge, or discard this patch.