Passed
Push — master ( 9f2c4f...e942df )
by Aleksei
17:57 queued 05:15
created
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/AuthHttp/tests/CookieTransportTest.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
         $http->setHandler(
46 46
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
47
-                if ($request->getAttribute('authContext')->getToken() === null) {
47
+                if ($request->getAttribute('authContext')->getToken() === null){
48 48
                     echo 'no token';
49
-                } else {
49
+                }else{
50 50
                     echo $request->getAttribute('authContext')->getToken()->getID();
51 51
                     echo ':';
52 52
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 
77 77
         $http->setHandler(
78 78
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
79
-                if ($request->getAttribute('authContext')->getToken() === null) {
79
+                if ($request->getAttribute('authContext')->getToken() === null){
80 80
                     echo 'no token';
81
-                } else {
81
+                }else{
82 82
                     echo $request->getAttribute('authContext')->getToken()->getID();
83 83
                     echo ':';
84 84
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         );
192 192
 
193 193
         self::assertSame(
194
-            'Expires=' . gmdate(DATE_COOKIE, time() + 3600),
194
+            'Expires='.gmdate(DATE_COOKIE, time() + 3600),
195 195
             $cookie[1]
196 196
         );
197 197
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,9 +43,12 @@  discard block
 block discarded – undo
43 43
 
44 44
         $http->setHandler(
45 45
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
46
-                if ($request->getAttribute('authContext')->getToken() === null) {
46
+                if ($request->getAttribute('authContext')->getToken() === null)
47
+                {
47 48
                     echo 'no token';
48
-                } else {
49
+                }
50
+                else
51
+                {
49 52
                     echo $request->getAttribute('authContext')->getToken()->getID();
50 53
                     echo ':';
51 54
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -67,9 +70,12 @@  discard block
 block discarded – undo
67 70
 
68 71
         $http->setHandler(
69 72
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
70
-                if ($request->getAttribute('authContext')->getToken() === null) {
73
+                if ($request->getAttribute('authContext')->getToken() === null)
74
+                {
71 75
                     echo 'no token';
72
-                } else {
76
+                }
77
+                else
78
+                {
73 79
                     echo $request->getAttribute('authContext')->getToken()->getID();
74 80
                     echo ':';
75 81
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
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.
src/AuthHttp/tests/Stub/TestAuthHttpProvider.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->getID() === 'ok') {
21
+        if ($token->getID() === '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->getID() === 'ok') {
21
+        if ($token->getID() === 'ok')
22
+        {
22 23
             return new \stdClass();
23 24
         }
24 25
 
Please login to merge, or discard this patch.
src/AuthHttp/tests/Stub/TestAuthHttpStorage.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 load(string $id): ?TokenInterface
20 20
     {
21
-        if ($id === 'bad') {
21
+        if ($id === 'bad'){
22 22
             return null;
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 load(string $id): ?TokenInterface
20 20
     {
21
-        if ($id === 'bad') {
21
+        if ($id === 'bad')
22
+        {
22 23
             return null;
23 24
         }
24 25
 
Please login to merge, or discard this patch.
src/Tokenizer/tests/ReflectionFileTest.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,12 +27,15 @@
 block discarded – undo
27 27
         $functionA = null;
28 28
         $functionB = null;
29 29
 
30
-        foreach ($reflection->getInvocations() as $invocation) {
31
-            if ($invocation->getName() == 'test_function_a') {
30
+        foreach ($reflection->getInvocations() as $invocation)
31
+        {
32
+            if ($invocation->getName() == 'test_function_a')
33
+            {
32 34
                 $functionA = $invocation;
33 35
             }
34 36
 
35
-            if ($invocation->getName() == 'test_function_b') {
37
+            if ($invocation->getName() == 'test_function_b')
38
+            {
36 39
                 $functionB = $invocation;
37 40
             }
38 41
         }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@  discard block
 block discarded – undo
16 16
         self::assertContains(TestTrait::class, $reflection->getTraits());
17 17
         self::assertContains(TestInterface::class, $reflection->getInterfaces());
18 18
 
19
-        self::assertSame([__NAMESPACE__ . '\hello'], $reflection->getFunctions());
19
+        self::assertSame([__NAMESPACE__.'\hello'], $reflection->getFunctions());
20 20
 
21 21
         $functionA = null;
22 22
         $functionB = null;
23 23
 
24
-        foreach ($reflection->getInvocations() as $invocation) {
25
-            if ($invocation->getName() == 'test_function_a') {
24
+        foreach ($reflection->getInvocations() as $invocation){
25
+            if ($invocation->getName() == 'test_function_a'){
26 26
                 $functionA = $invocation;
27 27
             }
28 28
 
29
-            if ($invocation->getName() == 'test_function_b') {
29
+            if ($invocation->getName() == 'test_function_b'){
30 30
                 $functionB = $invocation;
31 31
             }
32 32
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function testReflectionFileWithNamedParameters(): void
55 55
     {
56
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithNamedParameter.php');
56
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithNamedParameter.php');
57 57
 
58 58
         self::assertSame([
59 59
             \Spiral\Tests\Tokenizer\Classes\ClassWithNamedParameter::class,
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function testReflectionFileAnonymousClass(): void
64 64
     {
65
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithAnonymousClass.php');
65
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithAnonymousClass.php');
66 66
 
67 67
         self::assertSame([
68 68
             \Spiral\Tests\Tokenizer\Classes\ClassWithAnonymousClass::class,
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function testReflectionFileWithHeredoc(): void
73 73
     {
74
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithHeredoc.php');
74
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithHeredoc.php');
75 75
 
76 76
         self::assertSame([
77 77
             'Spiral\Tests\Tokenizer\Classes\ClassWithHeredoc',
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function testReflectionEnum(): void
82 82
     {
83
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassD.php');
83
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassD.php');
84 84
 
85 85
         self::assertSame([
86 86
             \Spiral\Tests\Tokenizer\Classes\ClassD::class,
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function testReflectionTypedEnum(): void
91 91
     {
92
-        $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassE.php');
92
+        $reflection = new ReflectionFile(__DIR__.'/Classes/ClassE.php');
93 93
 
94 94
         self::assertSame([
95 95
             \Spiral\Tests\Tokenizer\Classes\ClassE::class,
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     public function testReflectionInterface(): void
100 100
     {
101
-        $reflection = new ReflectionFile(__DIR__ . '/Interfaces/InterfaceA.php');
101
+        $reflection = new ReflectionFile(__DIR__.'/Interfaces/InterfaceA.php');
102 102
 
103 103
         self::assertSame([
104 104
             \Spiral\Tests\Tokenizer\Interfaces\InterfaceA::class,
Please login to merge, or discard this patch.
src/Translator/tests/TranslatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $container = new Container();
78 78
         $container->bind(TranslatorConfig::class, new TranslatorConfig([
79 79
             'locale'    => 'en',
80
-            'directory' => __DIR__ . '/fixtures/locales/',
80
+            'directory' => __DIR__.'/fixtures/locales/',
81 81
             'loaders'   => [
82 82
                 'php' => PhpFileLoader::class,
83 83
                 'po'  => PoFileLoader::class,
Please login to merge, or discard this patch.
src/Translator/tests/TraitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         $this->container->bind(TranslatorConfig::class, new TranslatorConfig([
46 46
             'locale'    => 'en',
47
-            'directory' => __DIR__ . '/fixtures/locales/',
47
+            'directory' => __DIR__.'/fixtures/locales/',
48 48
             'loaders'   => [
49 49
                 'php' => PhpFileLoader::class,
50 50
                 'po'  => PoFileLoader::class,
Please login to merge, or discard this patch.
src/Translator/tests/ManagerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $cache->shouldReceive('setLocales')->andReturn(null);
32 32
 
33 33
         $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([
34
-                'directory' => __DIR__ . '/fixtures/locales/',
34
+                'directory' => __DIR__.'/fixtures/locales/',
35 35
                 'loaders'   => [
36 36
                     'php' => PhpFileLoader::class,
37 37
                     'po'  => PoFileLoader::class,
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $cache->shouldNotReceive('setLocales')->andReturn(null);
50 50
 
51 51
         $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([
52
-                'directory' => __DIR__ . '/fixtures/locales/',
52
+                'directory' => __DIR__.'/fixtures/locales/',
53 53
                 'loaders'   => [
54 54
                     'php' => PhpFileLoader::class,
55 55
                     'po'  => PoFileLoader::class,
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $cache->shouldReceive('getLocales')->andReturn(['en', 'ru']);
67 67
 
68 68
         $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([
69
-                'directory' => __DIR__ . '/fixtures/locales/',
69
+                'directory' => __DIR__.'/fixtures/locales/',
70 70
                 'loaders'   => [
71 71
                     'php' => PhpFileLoader::class,
72 72
                     'po'  => PoFileLoader::class,
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         ]);
130 130
 
131 131
         $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([
132
-                'directory' => __DIR__ . '/fixtures/locales/',
132
+                'directory' => __DIR__.'/fixtures/locales/',
133 133
                 'loaders'   => [
134 134
                     'php' => PhpFileLoader::class,
135 135
                     'po'  => PoFileLoader::class,
Please login to merge, or discard this patch.