Passed
Pull Request — master (#1205)
by Aleksei
15:01 queued 03:15
created
src/Scaffolder/tests/Command/InfoCommandTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
             'create:jobHandler',
24 24
         ];
25 25
 
26
-        foreach ($strings as $string) {
26
+        foreach ($strings as $string){
27 27
             self::assertStringContainsString($string, $result);
28 28
         }
29 29
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@
 block discarded – undo
23 23
             'create:jobHandler',
24 24
         ];
25 25
 
26
-        foreach ($strings as $string) {
26
+        foreach ($strings as $string)
27
+        {
27 28
             self::assertStringContainsString($string, $result);
28 29
         }
29 30
     }
Please login to merge, or discard this patch.
src/Scaffolder/tests/Command/ConfigTest.php 2 patches
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -130,17 +130,22 @@  discard block
 block discarded – undo
130 130
         ];
131 131
 
132 132
         $reflectionMethods = [];
133
-        foreach ($reflection->getMethods() as $method) {
134
-            if ($method->getDeclaringClass()->name !== $reflection->name) {
133
+        foreach ($reflection->getMethods() as $method)
134
+        {
135
+            if ($method->getDeclaringClass()->name !== $reflection->name)
136
+            {
135 137
                 continue;
136 138
             }
137 139
 
138 140
             $reflectionMethods[$method->name] = $method;
139 141
             self::assertArrayHasKey($method->name, $methods);
140 142
 
141
-            if (!$method->hasReturnType()) {
143
+            if (!$method->hasReturnType())
144
+            {
142 145
                 self::assertNull($methods[$method->name]['hint']);
143
-            } else {
146
+            }
147
+            else
148
+            {
144 149
                 self::assertEquals($methods[$method->name]['hint'], $method->getReturnType()->getName());
145 150
             }
146 151
         }
@@ -180,8 +185,10 @@  discard block
 block discarded – undo
180 185
         ];
181 186
 
182 187
         $reflectionMethods = [];
183
-        foreach ($reflection->getMethods() as $method) {
184
-            if ($method->getDeclaringClass()->name !== $reflection->name) {
188
+        foreach ($reflection->getMethods() as $method)
189
+        {
190
+            if ($method->getDeclaringClass()->name !== $reflection->name)
191
+            {
185 192
                 continue;
186 193
             }
187 194
             $reflectionMethods[$method->name] = $method;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -127,17 +127,17 @@  discard block
 block discarded – undo
127 127
         ];
128 128
 
129 129
         $reflectionMethods = [];
130
-        foreach ($reflection->getMethods() as $method) {
131
-            if ($method->getDeclaringClass()->name !== $reflection->name) {
130
+        foreach ($reflection->getMethods() as $method){
131
+            if ($method->getDeclaringClass()->name !== $reflection->name){
132 132
                 continue;
133 133
             }
134 134
 
135 135
             $reflectionMethods[$method->name] = $method;
136 136
             self::assertArrayHasKey($method->name, $methods);
137 137
 
138
-            if (!$method->hasReturnType()) {
138
+            if (!$method->hasReturnType()){
139 139
                 self::assertNull($methods[$method->name]['hint']);
140
-            } else {
140
+            }else{
141 141
                 self::assertEquals($methods[$method->name]['hint'], $method->getReturnType()->getName());
142 142
             }
143 143
         }
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
         ];
178 178
 
179 179
         $reflectionMethods = [];
180
-        foreach ($reflection->getMethods() as $method) {
181
-            if ($method->getDeclaringClass()->name !== $reflection->name) {
180
+        foreach ($reflection->getMethods() as $method){
181
+            if ($method->getDeclaringClass()->name !== $reflection->name){
182 182
                 continue;
183 183
             }
184 184
             $reflectionMethods[$method->name] = $method;
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
         \clearstatcache();
265 265
 
266
-        $filename = $this->app->directory('config') . "$name.php";
266
+        $filename = $this->app->directory('config')."$name.php";
267 267
         self::assertFileExists($filename);
268 268
 
269 269
         return $filename;
Please login to merge, or discard this patch.
src/Models/tests/DataEntityTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         self::assertSame([], $entity->getValue());
69 69
 
70 70
         $entity['a'] = 90;
71
-        foreach ($entity as $key => $value) {
71
+        foreach ($entity as $key => $value){
72 72
             self::assertSame('a', $key);
73 73
             self::assertSame(90, $value);
74 74
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,8 @@
 block discarded – undo
68 68
         self::assertSame([], $entity->getValue());
69 69
 
70 70
         $entity['a'] = 90;
71
-        foreach ($entity as $key => $value) {
71
+        foreach ($entity as $key => $value)
72
+        {
72 73
             self::assertSame('a', $key);
73 74
             self::assertSame(90, $value);
74 75
         }
Please login to merge, or discard this patch.
src/Snapshots/tests/FileSnapshotTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     {
21 21
         $this->files = new Files();
22 22
         $this->fileSnapshot = new FileSnapshot(
23
-            __DIR__ . '/snapshots',
23
+            __DIR__.'/snapshots',
24 24
             1,
25 25
             Verbosity::DEBUG,
26 26
             new PlainRenderer(),
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     protected function tearDown(): void
32 32
     {
33
-        $this->files->deleteDirectory(__DIR__ . '/snapshots');
33
+        $this->files->deleteDirectory(__DIR__.'/snapshots');
34 34
     }
35 35
 
36 36
     public function testCreate(): void
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         self::assertStringContainsString('message', $s->getMessage());
45 45
         self::assertStringContainsString(__FILE__, $s->getMessage());
46 46
         self::assertStringContainsString('38', $s->getMessage());
47
-        self::assertCount(1, $this->files->getFiles(__DIR__ . '/snapshots'));
47
+        self::assertCount(1, $this->files->getFiles(__DIR__.'/snapshots'));
48 48
     }
49 49
 
50 50
     public function testCreateBiggerThanMaxFiles(): void
@@ -58,6 +58,6 @@  discard block
 block discarded – undo
58 58
         self::assertSame($e, $s->getException());
59 59
         self::assertSame($e2, $s2->getException());
60 60
 
61
-        self::assertCount(1, $this->files->getFiles(__DIR__ . '/snapshots'));
61
+        self::assertCount(1, $this->files->getFiles(__DIR__.'/snapshots'));
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
src/Cookies/tests/CookieTest.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,9 +110,12 @@
 block discarded – undo
110 110
         $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite);
111 111
         self::assertSame($expected, $cookie->getSameSite());
112 112
 
113
-        if ($expected === null) {
113
+        if ($expected === null)
114
+        {
114 115
             self::assertStringNotContainsString('SameSite=', $cookie->createHeader());
115
-        } else {
116
+        }
117
+        else
118
+        {
116 119
             self::assertStringContainsString("SameSite=$expected", $cookie->createHeader());
117 120
         }
118 121
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             true,
113 113
         );
114 114
 
115
-        self::assertSame($cookie->createHeader(), (string) $cookie);
115
+        self::assertSame($cookie->createHeader(), (string)$cookie);
116 116
         self::assertStringContainsString('cookie=value;', $cookie->createHeader());
117 117
 
118 118
         self::assertStringContainsString('Max-Age=100; Path=/; Domain=.domain.com; Secure; HttpOnly', $cookie->createHeader());
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
         $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite);
125 125
         self::assertSame($expected, $cookie->getSameSite());
126 126
 
127
-        if ($expected === null) {
127
+        if ($expected === null){
128 128
             self::assertStringNotContainsString('SameSite=', $cookie->createHeader());
129
-        } else {
129
+        }else{
130 130
             self::assertStringContainsString("SameSite=$expected", $cookie->createHeader());
131 131
         }
132 132
     }
Please login to merge, or discard this patch.
src/Security/tests/PermissionManagerTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
91 91
         self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION));
92 92
 
93 93
         // test pattern permission
94
-        self::assertEquals($manager, $manager->associate(static::ROLE, static::PERMISSION . '.*', AllowRule::class));
95
-        self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION . '.' . static::PERMISSION));
94
+        self::assertEquals($manager, $manager->associate(static::ROLE, static::PERMISSION.'.*', AllowRule::class));
95
+        self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION.'.'.static::PERMISSION));
96 96
 
97 97
         self::assertEquals($manager, $manager->deassociate(static::ROLE, static::PERMISSION));
98 98
         self::assertEquals($forbidRule, $manager->getRule(static::ROLE, static::PERMISSION));
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,8 @@
 block discarded – undo
70 70
 
71 71
         $this->rules->method('has')->willReturn(true);
72 72
         $this->rules->method('get')
73
-            ->willReturnCallback(static function (...$args) use (&$series) {
73
+            ->willReturnCallback(static function (...$args) use (&$series)
74
+            {
74 75
                 [$expectedArgs, $return] = \array_shift($series);
75 76
                 self::assertSame($expectedArgs, $args);
76 77
 
Please login to merge, or discard this patch.
src/Translator/tests/LoaderTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function testHasLocale(): void
19 19
     {
20 20
         $loader = new CatalogueLoader(new TranslatorConfig([
21
-            'directory' => __DIR__ . '/fixtures/locales/',
21
+            'directory' => __DIR__.'/fixtures/locales/',
22 22
         ]));
23 23
 
24 24
         self::assertTrue($loader->hasLocale('ru'));
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
         self::assertFalse($loader->hasLocale('FR'));
28 28
 
29 29
         $loader = new CatalogueLoader(new TranslatorConfig([
30
-            'directory' => __DIR__ . '/fixtures/locales/',
31
-            'directories' => [__DIR__ . '/fixtures/additional'],
30
+            'directory' => __DIR__.'/fixtures/locales/',
31
+            'directories' => [__DIR__.'/fixtures/additional'],
32 32
         ]));
33 33
 
34 34
         self::assertTrue($loader->hasLocale('ru'));
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function testGetLocales(): void
41 41
     {
42 42
         $loader = new CatalogueLoader(new TranslatorConfig([
43
-            'directory' => __DIR__ . '/fixtures/locales/',
43
+            'directory' => __DIR__.'/fixtures/locales/',
44 44
         ]));
45 45
 
46 46
         $compared = $loader->getLocales();
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     public function testGetLocalesWithAdditionalDirectories(): void
55 55
     {
56 56
         $loader = new CatalogueLoader(new TranslatorConfig([
57
-            'directory' => __DIR__ . '/fixtures/locales/',
58
-            'directories' => [__DIR__ . '/fixtures/additional'],
57
+            'directory' => __DIR__.'/fixtures/locales/',
58
+            'directories' => [__DIR__.'/fixtures/additional'],
59 59
         ]));
60 60
 
61 61
         $compared = $loader->getLocales();
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function testLoadCatalogue(): void
70 70
     {
71 71
         $loader = new CatalogueLoader(new TranslatorConfig([
72
-            'directory' => __DIR__ . '/fixtures/locales/',
72
+            'directory' => __DIR__.'/fixtures/locales/',
73 73
             'loaders'   => [
74 74
                 'php' => PhpFileLoader::class,
75 75
                 'po'  => PoFileLoader::class,
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
     public function testLoadCatalogueWithAdditionalDirectories(): void
106 106
     {
107 107
         $loader = new CatalogueLoader(new TranslatorConfig([
108
-            'directory' => __DIR__ . '/fixtures/locales/',
109
-            'directories' => [__DIR__ . '/fixtures/additional'],
108
+            'directory' => __DIR__.'/fixtures/locales/',
109
+            'directories' => [__DIR__.'/fixtures/additional'],
110 110
             'loaders'   => [
111 111
                 'php' => PhpFileLoader::class,
112 112
                 'po'  => PoFileLoader::class,
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
     public function testApplicationTranslationShouldOverrideAdditionalTranslations(): void
128 128
     {
129 129
         $loader = new CatalogueLoader(new TranslatorConfig([
130
-            'directory' => __DIR__ . '/fixtures/locales/',
131
-            'directories' => [__DIR__ . '/fixtures/additional'],
130
+            'directory' => __DIR__.'/fixtures/locales/',
131
+            'directories' => [__DIR__.'/fixtures/additional'],
132 132
             'loaders'   => [
133 133
                 'php' => PhpFileLoader::class,
134 134
                 'po'  => PoFileLoader::class,
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     public function testLoadCatalogueNoLoader(): void
146 146
     {
147 147
         $loader = new CatalogueLoader(new TranslatorConfig([
148
-            'directory' => __DIR__ . '/fixtures/locales/',
148
+            'directory' => __DIR__.'/fixtures/locales/',
149 149
             'loaders'   => [
150 150
                 'php' => PhpFileLoader::class,
151 151
             ],
Please login to merge, or discard this patch.
src/Encrypter/tests/EncrypterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         self::assertNotSame('test string', $encrypted);
54 54
         self::assertEquals('test string', $encrypter->decrypt($encrypted));
55 55
 
56
-        $encrypter->decrypt('badData.' . $encrypted);
56
+        $encrypter->decrypt('badData.'.$encrypted);
57 57
     }
58 58
 
59 59
     public function testBadKey(): void
Please login to merge, or discard this patch.
src/Boot/tests/Environment/DebugModeTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
 
35 35
         self::assertSame($expected, $enum);
36 36
 
37
-        if ($enum === DebugMode::Enabled) {
37
+        if ($enum === DebugMode::Enabled){
38 38
             self::assertTrue($enum->isEnabled());
39
-        } else {
39
+        }else{
40 40
             self::assertFalse($enum->isEnabled());
41 41
         }
42 42
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,12 @@
 block discarded – undo
34 34
 
35 35
         self::assertSame($expected, $enum);
36 36
 
37
-        if ($enum === DebugMode::Enabled) {
37
+        if ($enum === DebugMode::Enabled)
38
+        {
38 39
             self::assertTrue($enum->isEnabled());
39
-        } else {
40
+        }
41
+        else
42
+        {
40 43
             self::assertFalse($enum->isEnabled());
41 44
         }
42 45
     }
Please login to merge, or discard this patch.