Completed
Pull Request — master (#7)
by John
02:17
created
src/Tests/Authenticator/AuthenticatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
     {
178 178
         $authenticator = new Authenticator($this->keys);
179 179
         $request       = new Request();
180
-        $request->headers->set('Authorization', 'Bearer ' . self::TEST_TOKEN);
180
+        $request->headers->set('Authorization', 'Bearer '.self::TEST_TOKEN);
181 181
         $token = $authenticator->createToken($request, 'myprovider');
182 182
 
183 183
         $expected = ["prn" => "john", 'iss' => 'http://api.server1.com/oauth2/token'];
Please login to merge, or discard this patch.
src/Authenticator/JwtKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
         if ($this->requiredClaims) {
152 152
             $missing = array_diff_key(array_flip($this->requiredClaims), $claims);
153 153
             if (count($missing)) {
154
-                throw new \InvalidArgumentException("Missing claims: " . implode(', ', $missing));
154
+                throw new \InvalidArgumentException("Missing claims: ".implode(', ', $missing));
155 155
             }
156 156
         }
157 157
         if ($this->issuer && !isset($claims['iss'])) {
Please login to merge, or discard this patch.
src/DependencyInjection/KleijnWebJwtExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function load(array $configs, ContainerBuilder $container)
27 27
     {
28 28
         $config = $this->processConfiguration(new Configuration(), $configs);
29
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
29
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30 30
         $loader->load('services.yml');
31 31
 
32 32
         $keysDefinition = new Definition('jwt.keys');
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         foreach ($config['keys'] as $keyId => $keyConfig) {
36 36
 
37 37
             $keyConfig['kid'] = $keyId;
38
-            $keyDefinition    = new Definition('jwt.keys.' . $keyId);
38
+            $keyDefinition    = new Definition('jwt.keys.'.$keyId);
39 39
             $keyDefinition->setClass('KleijnWeb\JwtBundle\Authenticator\JwtKey');
40 40
 
41 41
             if (isset($keyConfig['loader'])) {
Please login to merge, or discard this patch.
src/Tests/Functional/FunctionalTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 use KleijnWeb\JwtBundle\Tests\Authenticator\AuthenticatorTest;
12 12
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
13
-use Symfony\Bundle\FrameworkBundle\Client;
14 13
 
15 14
 /**
16 15
  * @author John Kleijn <[email protected]>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $client = $this->createClient();
97 97
         $server = [];
98 98
         if ($token) {
99
-            $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . $token];
99
+            $server = ['HTTP_AUTHORIZATION' => 'Bearer '.$token];
100 100
         }
101 101
         $client->request('GET', $url, $parameters = [], $files = [], $server);
102 102
 
Please login to merge, or discard this patch.