Test Failed
Pull Request — master (#62)
by
unknown
05:03
created
Entity/RefreshToken.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
     /**
114 114
      * Get valid.
115 115
      *
116
-     * @return \DateTime
116
+     * @return string
117 117
      */
118 118
     public function getValid()
119 119
     {
Please login to merge, or discard this patch.
Model/RefreshTokenInterface.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     /**
68 68
      * Get user.
69 69
      *
70
-     * @return $username
70
+     * @return string
71 71
      */
72 72
     public function getUsername();
73 73
 
Please login to merge, or discard this patch.
EventListener/AttachRefreshTokenOnSuccessListener.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Gesdinet\JWTRefreshTokenBundle\EventListener;
13 13
 
14 14
 use Gesdinet\JWTRefreshTokenBundle\Model\RefreshTokenManagerInterface;
15
-use Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken;
16 15
 use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationSuccessEvent;
17 16
 use Symfony\Component\Security\Core\User\UserInterface;
18 17
 use Symfony\Component\Validator\Validator\ValidatorInterface;
Please login to merge, or discard this patch.
Service/RefreshToken.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      *
50 50
      * @param Request $request
51 51
      *
52
-     * @return mixed
52
+     * @return \Symfony\Component\HttpFoundation\Response|\Lexik\Bundle\JWTAuthenticationBundle\Response\JWTAuthenticationSuccessResponse
53 53
      *
54 54
      * @throws AuthenticationException
55 55
      */
Please login to merge, or discard this patch.
EventListener/TokenExtractor/RequestHeaderTokenExtractorEventListener.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@
 block discarded – undo
13 13
 use Gesdinet\JWTRefreshTokenBundle\Event\GetTokenRequestEvent;
14 14
 
15 15
 class RequestHeaderTokenExtractorEventListener {
16
-	private $name;
17
-	public function __construct($name){
18
-		$this->name = $name;
19
-	}
20
-	public function onGetToken(GetTokenRequestEvent $event){
21
-		$request = $event->getRequest();
22
-		$refreshTokenString = $request->headers->get($this->name);
16
+    private $name;
17
+    public function __construct($name){
18
+        $this->name = $name;
19
+    }
20
+    public function onGetToken(GetTokenRequestEvent $event){
21
+        $request = $event->getRequest();
22
+        $refreshTokenString = $request->headers->get($this->name);
23 23
 
24
-		if($refreshTokenString){
24
+        if($refreshTokenString){
25 25
             $event->setToken($refreshTokenString);
26 26
             $event->stopPropagation();
27 27
         }
28
-	}
28
+    }
29 29
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 
15 15
 class RequestHeaderTokenExtractorEventListener {
16 16
 	private $name;
17
-	public function __construct($name){
17
+	public function __construct($name) {
18 18
 		$this->name = $name;
19 19
 	}
20
-	public function onGetToken(GetTokenRequestEvent $event){
20
+	public function onGetToken(GetTokenRequestEvent $event) {
21 21
 		$request = $event->getRequest();
22 22
 		$refreshTokenString = $request->headers->get($this->name);
23 23
 
24
-		if($refreshTokenString){
24
+		if ($refreshTokenString) {
25 25
             $event->setToken($refreshTokenString);
26 26
             $event->stopPropagation();
27 27
         }
Please login to merge, or discard this patch.
EventListener/TokenExtractor/RequestCookieTokenExtractorEventListener.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
 use Gesdinet\JWTRefreshTokenBundle\Event\GetTokenRequestEvent;
15 15
 
16 16
 class RequestCookieTokenExtractorEventListener {
17
-	private $name;
18
-	public function __construct($name){
19
-		$this->name = $name;
20
-	}
21
-	public function onGetToken(GetTokenRequestEvent $event){
22
-		$request = $event->getRequest();
23
-		$refreshTokenString = $request->cookies->get($this->name);
17
+    private $name;
18
+    public function __construct($name){
19
+        $this->name = $name;
20
+    }
21
+    public function onGetToken(GetTokenRequestEvent $event){
22
+        $request = $event->getRequest();
23
+        $refreshTokenString = $request->cookies->get($this->name);
24 24
 
25
-		if($refreshTokenString){
25
+        if($refreshTokenString){
26 26
             $event->setToken($refreshTokenString);
27 27
             $event->stopPropagation();
28 28
         }
29
-	}
29
+    }
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
 
16 16
 class RequestCookieTokenExtractorEventListener {
17 17
 	private $name;
18
-	public function __construct($name){
18
+	public function __construct($name) {
19 19
 		$this->name = $name;
20 20
 	}
21
-	public function onGetToken(GetTokenRequestEvent $event){
21
+	public function onGetToken(GetTokenRequestEvent $event) {
22 22
 		$request = $event->getRequest();
23 23
 		$refreshTokenString = $request->cookies->get($this->name);
24 24
 
25
-		if($refreshTokenString){
25
+		if ($refreshTokenString) {
26 26
             $event->setToken($refreshTokenString);
27 27
             $event->stopPropagation();
28 28
         }
Please login to merge, or discard this patch.
EventListener/TokenExtractor/RequestBodyTokenExtractorEventListener.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
 use Gesdinet\JWTRefreshTokenBundle\Event\GetTokenRequestEvent;
14 14
 
15 15
 class RequestBodyTokenExtractorEventListener {
16
-	private $name;
16
+    private $name;
17 17
     public function __construct($name){
18
-		$this->name = $name;
19
-	}
20
-	public function onGetToken(GetTokenRequestEvent $event){
21
-		$request = $event->getRequest();
22
-		$refreshTokenString = null;
18
+        $this->name = $name;
19
+    }
20
+    public function onGetToken(GetTokenRequestEvent $event){
21
+        $request = $event->getRequest();
22
+        $refreshTokenString = null;
23 23
         if ($request->headers->get('content_type') == 'application/json') {
24 24
             $content = $request->getContent();
25 25
             $params = !empty($content) ? json_decode($content, true) : array();
@@ -34,5 +34,5 @@  discard block
 block discarded – undo
34 34
             $event->setToken($refreshTokenString);
35 35
             $event->stopPropagation();
36 36
         }
37
-	}
37
+    }
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
 
15 15
 class RequestBodyTokenExtractorEventListener {
16 16
 	private $name;
17
-    public function __construct($name){
17
+    public function __construct($name) {
18 18
 		$this->name = $name;
19 19
 	}
20
-	public function onGetToken(GetTokenRequestEvent $event){
20
+	public function onGetToken(GetTokenRequestEvent $event) {
21 21
 		$request = $event->getRequest();
22 22
 		$refreshTokenString = null;
23 23
         if ($request->headers->get('content_type') == 'application/json') {
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $refreshTokenString = $request->request->get($this->name);
31 31
         }
32 32
 
33
-        if($refreshTokenString){
33
+        if ($refreshTokenString) {
34 34
             $event->setToken($refreshTokenString);
35 35
             $event->stopPropagation();
36 36
         }
Please login to merge, or discard this patch.
EventListener/TokenSetter/ResponseHeaderTokenSetterEventListener.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 use Gesdinet\JWTRefreshTokenBundle\Event\AddTokenResponseEvent;
15 15
 
16 16
 class ResponseHeaderTokenSetterEventListener {
17
-	private $name;
18
-	public function __construct($name){
19
-		$this->name = $name;
20
-	}
21
-	public function onAddToken(AddTokenResponseEvent $event){
22
-		$response = $event->getResponse();
23
-		$token = $event->getToken();
24
-		$response->headers->set($this->name, $token);
25
-	}
17
+    private $name;
18
+    public function __construct($name){
19
+        $this->name = $name;
20
+    }
21
+    public function onAddToken(AddTokenResponseEvent $event){
22
+        $response = $event->getResponse();
23
+        $token = $event->getToken();
24
+        $response->headers->set($this->name, $token);
25
+    }
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 
16 16
 class ResponseHeaderTokenSetterEventListener {
17 17
 	private $name;
18
-	public function __construct($name){
18
+	public function __construct($name) {
19 19
 		$this->name = $name;
20 20
 	}
21
-	public function onAddToken(AddTokenResponseEvent $event){
21
+	public function onAddToken(AddTokenResponseEvent $event) {
22 22
 		$response = $event->getResponse();
23 23
 		$token = $event->getToken();
24 24
 		$response->headers->set($this->name, $token);
Please login to merge, or discard this patch.
EventListener/TokenSetter/ResponseBodyTokenSetterEventListener.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 use Gesdinet\JWTRefreshTokenBundle\Event\AddTokenResponseEvent;
15 15
 
16 16
 class ResponseBodyTokenSetterEventListener {
17
-	private $name;
18
-	public function __construct($name){
19
-		$this->name = $name;
20
-	}
21
-	public function onAddToken(AddTokenResponseEvent $event){
22
-		$token = $event->getToken();
23
-		$data = $event->getData();
24
-		$data[$this->name] = $token;
25
-		$event->setData($data);
26
-	}
17
+    private $name;
18
+    public function __construct($name){
19
+        $this->name = $name;
20
+    }
21
+    public function onAddToken(AddTokenResponseEvent $event){
22
+        $token = $event->getToken();
23
+        $data = $event->getData();
24
+        $data[$this->name] = $token;
25
+        $event->setData($data);
26
+    }
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 
16 16
 class ResponseBodyTokenSetterEventListener {
17 17
 	private $name;
18
-	public function __construct($name){
18
+	public function __construct($name) {
19 19
 		$this->name = $name;
20 20
 	}
21
-	public function onAddToken(AddTokenResponseEvent $event){
21
+	public function onAddToken(AddTokenResponseEvent $event) {
22 22
 		$token = $event->getToken();
23 23
 		$data = $event->getData();
24 24
 		$data[$this->name] = $token;
Please login to merge, or discard this patch.