Passed
Pull Request — master (#24)
by Damian
01:51
created
tests/unit/JWTAuthenticationHandlerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         Environment::putEnv('JWT_SIGNER_KEY=string');
50 50
 
51 51
         $request = clone Controller::curr()->getRequest();
52
-        $request->addHeader('Authorization', 'Bearer ' . $this->token);
52
+        $request->addHeader('Authorization', 'Bearer '.$this->token);
53 53
 
54 54
         $handler = JWTAuthenticationHandler::singleton();
55 55
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     public function testAuthenticateRequest()
66 66
     {
67 67
         $request = clone Controller::curr()->getRequest();
68
-        $request->addHeader('Authorization', 'Bearer ' . $this->token);
68
+        $request->addHeader('Authorization', 'Bearer '.$this->token);
69 69
 
70 70
         $handler = JWTAuthenticationHandler::singleton();
71 71
 
Please login to merge, or discard this patch.
tests/unit/RefreshTokenMutationCreatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     {
72 72
         $token = $anonymous ? $this->anonymousToken : $this->token;
73 73
         $request = clone Controller::curr()->getRequest();
74
-        $request->addHeader('Authorization', 'Bearer ' . $token);
74
+        $request->addHeader('Authorization', 'Bearer '.$token);
75 75
 
76 76
         $request->setSession(new Session(['hello' => 'bye'])); // We need a session
77 77
         Controller::curr()->setRequest($request);
Please login to merge, or discard this patch.
tests/unit/JWTAuthenticatorTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $authenticator = JWTAuthenticator::singleton();
52 52
         $request = clone Controller::curr()->getRequest();
53
-        $request->addHeader('Authorization', 'Bearer ' . $this->token);
53
+        $request->addHeader('Authorization', 'Bearer '.$this->token);
54 54
 
55 55
         $result = $authenticator->authenticate(['token' => $this->token], $request);
56 56
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         $authenticator = JWTAuthenticator::singleton();
69 69
         $request = clone Controller::curr()->getRequest();
70
-        $request->addHeader('Authorization', 'Bearer ' . $this->token);
70
+        $request->addHeader('Authorization', 'Bearer '.$this->token);
71 71
 
72 72
         $result = $authenticator->authenticate(['token' => $this->token], $request);
73 73
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $authenticator = JWTAuthenticator::singleton();
83 83
         $request = clone Controller::curr()->getRequest();
84
-        $request->addHeader('Authorization', 'Bearer ' . $this->token);
84
+        $request->addHeader('Authorization', 'Bearer '.$this->token);
85 85
 
86 86
         // Invalidate the Unique ID by making it something arbitrarily wrong
87 87
         /** @var Member|MemberExtension $member */
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function testRSAKey()
103 103
     {
104
-        $keys = realpath(__DIR__ . '/../keys');
104
+        $keys = realpath(__DIR__.'/../keys');
105 105
         Environment::setEnv('JWT_SIGNER_KEY', "{$keys}/private.key");
106 106
         Environment::setEnv('JWT_PUBLIC_KEY', "{$keys}/public.pub");
107 107
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
         $authenticator = JWTAuthenticator::singleton();
120 120
         $request = clone Controller::curr()->getRequest();
121
-        $request->addHeader('Authorization', 'Bearer ' . $token);
121
+        $request->addHeader('Authorization', 'Bearer '.$token);
122 122
 
123 123
         $result = $authenticator->authenticate(['token' => $token], $request);
124 124
 
Please login to merge, or discard this patch.
tests/unit/ValidateTokenQueryCreatorTest.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
     private function buildRequest()
54 54
     {
55 55
         $request = clone Controller::curr()->getRequest();
56
-        $request->addHeader('Authorization', 'Bearer ' . $this->token);
56
+        $request->addHeader('Authorization', 'Bearer '.$this->token);
57 57
         $request->setSession(new Session(['hello' => 'bye'])); // We need a session
58 58
         Controller::curr()->setRequest($request);
59 59
 
Please login to merge, or discard this patch.
src/Helpers/PathResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public static function resolve(string $path, string $base = BASE_PATH): ?string
16 16
     {
17 17
         if (strstr($path, '/') !== 0) {
18
-            $path = $base . '/' . $path;
18
+            $path = $base.'/'.$path;
19 19
         }
20 20
         return realpath($path) ?: null;
21 21
     }
Please login to merge, or discard this patch.
src/Authentication/JWTAuthenticator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $signerPath = PathResolver::resolve($signerKey);
94 94
         if ($signerPath) {
95 95
             $password = $this->getEnv('JWT_KEY_PASSWORD', null);
96
-            return new Key('file://' . $signerPath, $password);
96
+            return new Key('file://'.$signerPath, $password);
97 97
         }
98 98
         return new Key($signerKey);
99 99
     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         if (empty($publicPath)) {
120 120
             throw new LogicException('JWT_PUBLIC_KEY path does not exist');
121 121
         }
122
-        return new Key('file://' . $publicPath);
122
+        return new Key('file://'.$publicPath);
123 123
     }
124 124
 
125 125
     /**
Please login to merge, or discard this patch.
src/Authentication/AnonymousUserAuthenticator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     {
56 56
         // Get user, or create if not exists
57 57
         $username = static::config()->get('anonymous_username');
58
-        $member = Injector::inst()->get(Member::class . '.anonymous', true, ['username' => $username]);
58
+        $member = Injector::inst()->get(Member::class.'.anonymous', true, ['username' => $username]);
59 59
 
60 60
         // Validate this member is still allowed to login
61 61
         $result = $result ?: ValidationResult::create();
Please login to merge, or discard this patch.