Passed
Push — master ( 48358c...5b4064 )
by Valentin
13:24 queued 08:47
created
src/AuthHttp/src/TransportRegistry.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     {
50 50
         $name = $name ?? $this->default;
51 51
 
52
-        if (!isset($this->transports[$name])) {
52
+        if (!isset($this->transports[$name])){
53 53
             throw new TransportException("Undefined auth transport {$name}");
54 54
         }
55 55
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@
 block discarded – undo
49 49
     {
50 50
         $name = $name ?? $this->default;
51 51
 
52
-        if (!isset($this->transports[$name])) {
52
+        if (!isset($this->transports[$name]))
53
+        {
53 54
             throw new TransportException("Undefined auth transport {$name}");
54 55
         }
55 56
 
Please login to merge, or discard this patch.
src/AuthHttp/tests/AuthMiddlewareTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 
76 76
         $http->setHandler(
77 77
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
78
-                if ($request->getAttribute('authContext')->getToken() === null) {
78
+                if ($request->getAttribute('authContext')->getToken() === null){
79 79
                     echo 'no token';
80 80
                 }
81 81
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,8 @@
 block discarded – undo
75 75
 
76 76
         $http->setHandler(
77 77
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
78
-                if ($request->getAttribute('authContext')->getToken() === null) {
78
+                if ($request->getAttribute('authContext')->getToken() === null)
79
+                {
79 80
                     echo 'no token';
80 81
                 }
81 82
             }
Please login to merge, or discard this patch.
src/AuthHttp/tests/HeaderTransportTest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  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
                     echo 'no token';
48
-                } else {
48
+                }else{
49 49
                     echo $request->getAttribute('authContext')->getToken()->getID();
50 50
                     echo ':';
51 51
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 
68 68
         $http->setHandler(
69 69
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
70
-                if ($request->getAttribute('authContext')->getToken() === null) {
70
+                if ($request->getAttribute('authContext')->getToken() === null){
71 71
                     echo 'no token';
72
-                } else {
72
+                }else{
73 73
                     echo $request->getAttribute('authContext')->getToken()->getID();
74 74
                     echo ':';
75 75
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
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/AuthHttp/tests/Diactoros/ResponseFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $response = new Response('php://memory', $code, []);
38 38
         $response = $response->withStatus($code, $reasonPhrase);
39 39
 
40
-        foreach ($this->config->getBaseHeaders() as $header => $value) {
40
+        foreach ($this->config->getBaseHeaders() as $header => $value){
41 41
             $response = $response->withAddedHeader($header, $value);
42 42
         }
43 43
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,8 @@
 block discarded – undo
37 37
         $response = new Response('php://memory', $code, []);
38 38
         $response = $response->withStatus($code, $reasonPhrase);
39 39
 
40
-        foreach ($this->config->getBaseHeaders() as $header => $value) {
40
+        foreach ($this->config->getBaseHeaders() as $header => $value)
41
+        {
41 42
             $response = $response->withAddedHeader($header, $value);
42 43
         }
43 44
 
Please login to merge, or discard this patch.
src/AuthHttp/tests/Diactoros/UploadedFileFactory.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
         string $clientFilename = null,
27 27
         string $clientMediaType = null
28 28
     ): UploadedFileInterface {
29
-        if ($size === null) {
29
+        if ($size === null){
30 30
             $size = $stream->getSize();
31 31
         }
32 32
 
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
         string $clientFilename = null,
27 27
         string $clientMediaType = null
28 28
     ): UploadedFileInterface {
29
-        if ($size === null) {
29
+        if ($size === null)
30
+        {
30 31
             $size = $stream->getSize();
31 32
         }
32 33
 
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.