Completed
Pull Request — master (#40)
by
unknown
12:06
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.
Service/RefreshToken.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      *
47 47
      * @param Request $request
48 48
      *
49
-     * @return mixed
49
+     * @return \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\JsonResponse
50 50
      *
51 51
      * @throws AuthenticationException
52 52
      */
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.
DependencyInjection/Compiler/CustomUserProviderCompilerPass.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
     public function process(ContainerBuilder $container)
19 19
     {
20 20
         $customUserProvider = $container->getParameter('gesdinet_jwt_refresh_token.user_provider');
21
-        if(!$customUserProvider) {
21
+        if (!$customUserProvider) {
22 22
             return;
23 23
         }
24
-        if(!$container->hasDefinition('gesdinet.jwtrefreshtoken.user_provider')) {
24
+        if (!$container->hasDefinition('gesdinet.jwtrefreshtoken.user_provider')) {
25 25
             return;
26 26
         }
27 27
 
Please login to merge, or discard this patch.
Security/Provider/RefreshTokenProvider.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function loadUserByUsername($username)
51 51
     {
52
-        if($this->customUserProvider != null) {
52
+        if ($this->customUserProvider != null) {
53 53
             return $this->customUserProvider->loadUserByUsername($username);
54 54
         }
55 55
         else {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function refreshUser(UserInterface $user)
65 65
     {
66
-        if($this->customUserProvider != null) {
66
+        if ($this->customUserProvider != null) {
67 67
             return $this->customUserProvider->refreshUser($user);
68 68
         }
69 69
         else {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function supportsClass($class)
75 75
     {
76
-        if($this->customUserProvider != null) {
76
+        if ($this->customUserProvider != null) {
77 77
             return $this->customUserProvider->supportsClass($class);
78 78
         }
79 79
         else {
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         if($this->customUserProvider != null) {
53 53
             return $this->customUserProvider->loadUserByUsername($username);
54
-        }
55
-        else {
54
+        } else {
56 55
             return new User(
57 56
                 $username,
58 57
                 null,
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
     {
66 65
         if($this->customUserProvider != null) {
67 66
             return $this->customUserProvider->refreshUser($user);
68
-        }
69
-        else {
67
+        } else {
70 68
             throw new UnsupportedUserException();
71 69
         }
72 70
     }
@@ -75,8 +73,7 @@  discard block
 block discarded – undo
75 73
     {
76 74
         if($this->customUserProvider != null) {
77 75
             return $this->customUserProvider->supportsClass($class);
78
-        }
79
-        else {
76
+        } else {
80 77
             return 'Symfony\Component\Security\Core\User\User' === $class;
81 78
         }
82 79
     }
Please login to merge, or discard this patch.