Completed
Pull Request — master (#7)
by John
07:24
created
src/Tests/Functional/App/TestBundle.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 class TestBundle extends Bundle
21 21
 {
22 22
     /**
23
-     * @return ExtensionInterface
23
+     * @return boolean
24 24
      */
25 25
     public function getContainerExtension()
26 26
     {
Please login to merge, or discard this patch.
src/Authenticator/Authenticator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     private $keys = [];
27 27
 
28 28
     /**
29
-     * @param JwtKey[] $keys
29
+     * @param \ArrayObject $keys
30 30
      */
31 31
     public function __construct(\ArrayObject $keys)
32 32
     {
Please login to merge, or discard this patch.
src/Tests/Functional/FunctionalTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     public function canGetSecuredContentWitValidPskToken()
59 59
     {
60 60
         $client = $this->createClient();
61
-        $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::PSK_TOKEN];
61
+        $server = ['HTTP_AUTHORIZATION' => 'Bearer '.self::PSK_TOKEN];
62 62
         $client->request('GET', '/secured', $parameters = [], $files = [], $server);
63 63
         $this->assertSame('SECURED CONTENT', $client->getResponse()->getContent());
64 64
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function canGetSecuredContentWitValidHmacToken()
70 70
     {
71 71
         $client = $this->createClient();
72
-        $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::HMAC_TOKEN];
72
+        $server = ['HTTP_AUTHORIZATION' => 'Bearer '.self::HMAC_TOKEN];
73 73
         $client->request('GET', '/secured', $parameters = [], $files = [], $server);
74 74
         $this->assertSame('SECURED CONTENT', $client->getResponse()->getContent());
75 75
     }
Please login to merge, or discard this patch.
src/Tests/Functional/App/app/TestKernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
      */
26 26
     public function registerContainerConfiguration(LoaderInterface $loader)
27 27
     {
28
-        $loader->load(__DIR__ . '/config.yml');
28
+        $loader->load(__DIR__.'/config.yml');
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
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/DependencyInjection/KleijnWebJwtExtension.php 1 patch
Spacing   +3 added lines, -3 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,11 +35,11 @@  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'])) {
42
-                $keyConfig['loader'] = $container->getDefinition($keyConfig['loader']);;
42
+                $keyConfig['loader'] = $container->getDefinition($keyConfig['loader']); ;
43 43
             }
44 44
             $keyDefinition->addArgument($keyConfig);
45 45
             $keysDefinition->addMethodCall('append', [$keyDefinition]);
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.