Passed
Push — develop ( 5cfbbd...a66307 )
by nguereza
02:52
created
src/OAuth2/Repository/AuthorizationCodeRepository.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public function cleanExpiredTokens(): void
86 86
     {
87 87
         $this->query()->where('expires')->lte(date('Y-m-d H:i:s'))
88
-                      ->delete();
88
+                        ->delete();
89 89
     }
90 90
 
91 91
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     public function deleteToken(BaseToken $token): bool
95 95
     {
96 96
         return $this->query()->where('authorization_code')->is($token->getToken())
97
-                             ->delete() >= 0;
97
+                                ->delete() >= 0;
98 98
     }
99 99
 
100 100
     /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class AuthorizationCodeRepository
61 61
  * @package Platine\Framework\OAuth2\Repository
62 62
  */
63
-class AuthorizationCodeRepository extends Repository implements AuthorizationCodeRepositoryInterface
64
-{
63
+class AuthorizationCodeRepository extends Repository implements AuthorizationCodeRepositoryInterface {
65 64
     /**
66 65
      * The Client Service
67 66
      * @var ClientService
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
      * @param EntityManager $manager
74 73
      * @param ClientService $clientService
75 74
      */
76
-    public function __construct(EntityManager $manager, ClientService $clientService)
77
-    {
75
+    public function __construct(EntityManager $manager, ClientService $clientService) {
78 76
         parent::__construct($manager, OauthAuthorizationCode::class);
79 77
         $this->clientService = $clientService;
80 78
     }
Please login to merge, or discard this patch.
src/OAuth2/Repository/ClientRepository.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,14 +57,12 @@
 block discarded – undo
57 57
  * @class ClientRepository
58 58
  * @package Platine\Framework\OAuth2\Repository
59 59
  */
60
-class ClientRepository extends Repository implements ClientRepositoryInterface
61
-{
60
+class ClientRepository extends Repository implements ClientRepositoryInterface {
62 61
     /**
63 62
      * Create new instance
64 63
      * @param EntityManager $manager
65 64
      */
66
-    public function __construct(EntityManager $manager)
67
-    {
65
+    public function __construct(EntityManager $manager) {
68 66
         parent::__construct($manager, OauthClient::class);
69 67
     }
70 68
 
Please login to merge, or discard this patch.
src/OAuth2/Repository/ScopeRepository.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,8 +92,8 @@
 block discarded – undo
92 92
     public function getDefaultScopes(): array
93 93
     {
94 94
         $result = $this->query()
95
-                       ->where('is_default')->is(1)
96
-                       ->all();
95
+                        ->where('is_default')->is(1)
96
+                        ->all();
97 97
         $scopes = [];
98 98
         foreach ($result as $row) {
99 99
             $scopes[] = Scope::createNewScope(
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,14 +57,12 @@
 block discarded – undo
57 57
  * @class ScopeRepository
58 58
  * @package Platine\Framework\OAuth2\Repository
59 59
  */
60
-class ScopeRepository extends Repository implements ScopeRepositoryInterface
61
-{
60
+class ScopeRepository extends Repository implements ScopeRepositoryInterface {
62 61
     /**
63 62
      * Create new instance
64 63
      * @param EntityManager $manager
65 64
      */
66
-    public function __construct(EntityManager $manager)
67
-    {
65
+    public function __construct(EntityManager $manager) {
68 66
         parent::__construct($manager, OauthScope::class);
69 67
     }
70 68
 
Please login to merge, or discard this patch.
src/OAuth2/Repository/RefreshTokenRepository.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -79,27 +79,27 @@  discard block
 block discarded – undo
79 79
         $this->clientService = $clientService;
80 80
     }
81 81
 
82
-     /**
83
-     * {@inheritdoc}
84
-     */
82
+        /**
83
+         * {@inheritdoc}
84
+         */
85 85
     public function cleanExpiredTokens(): void
86 86
     {
87 87
         $this->query()->where('expires')->lte(date('Y-m-d H:i:s'))
88
-                      ->delete();
88
+                        ->delete();
89 89
     }
90 90
 
91
-     /**
92
-     * {@inheritdoc}
93
-     */
91
+        /**
92
+         * {@inheritdoc}
93
+         */
94 94
     public function deleteToken(BaseToken $token): bool
95 95
     {
96 96
         return $this->query()->where('refresh_token')->is($token->getToken())
97
-                             ->delete() >= 0;
97
+                                ->delete() >= 0;
98 98
     }
99 99
 
100
-     /**
101
-     * {@inheritdoc}
102
-     */
100
+        /**
101
+         * {@inheritdoc}
102
+         */
103 103
     public function getByToken(string $token): ?BaseToken
104 104
     {
105 105
         $refreshToken = $this->find($token);
@@ -121,17 +121,17 @@  discard block
 block discarded – undo
121 121
         ]);
122 122
     }
123 123
 
124
-     /**
125
-     * {@inheritdoc}
126
-     */
124
+        /**
125
+         * {@inheritdoc}
126
+         */
127 127
     public function isTokenExists(string $token): bool
128 128
     {
129 129
         return $this->find($token) !== null;
130 130
     }
131 131
 
132
-     /**
133
-     * {@inheritdoc}
134
-     */
132
+        /**
133
+         * {@inheritdoc}
134
+         */
135 135
     public function saveRefreshToken(RefreshToken $token): RefreshToken
136 136
     {
137 137
         $clientId = null;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class RefreshTokenRepository
61 61
  * @package Platine\Framework\OAuth2\Repository
62 62
  */
63
-class RefreshTokenRepository extends Repository implements RefreshTokenRepositoryInterface
64
-{
63
+class RefreshTokenRepository extends Repository implements RefreshTokenRepositoryInterface {
65 64
     /**
66 65
      * The Client Service
67 66
      * @var ClientService
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
      * @param EntityManager $manager
74 73
      * @param ClientService $clientService
75 74
      */
76
-    public function __construct(EntityManager $manager, ClientService $clientService)
77
-    {
75
+    public function __construct(EntityManager $manager, ClientService $clientService) {
78 76
         parent::__construct($manager, OauthRefreshToken::class);
79 77
         $this->clientService = $clientService;
80 78
     }
Please login to merge, or discard this patch.
src/OAuth2/Repository/AccessTokenRepository.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public function cleanExpiredTokens(): void
86 86
     {
87 87
         $this->query()->where('expires')->lte(date('Y-m-d H:i:s'))
88
-                      ->delete();
88
+                        ->delete();
89 89
     }
90 90
 
91 91
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     public function deleteToken(BaseToken $token): bool
95 95
     {
96 96
         return $this->query()->where('access_token')->is($token->getToken())
97
-                             ->delete() >= 0;
97
+                                ->delete() >= 0;
98 98
     }
99 99
 
100 100
     /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class AccessTokenRepository
61 61
  * @package Platine\Framework\OAuth2\Repository
62 62
  */
63
-class AccessTokenRepository extends Repository implements AccessTokenRepositoryInterface
64
-{
63
+class AccessTokenRepository extends Repository implements AccessTokenRepositoryInterface {
65 64
     /**
66 65
      * The Client Service
67 66
      * @var ClientService
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
      * @param EntityManager $manager
74 73
      * @param ClientService $clientService
75 74
      */
76
-    public function __construct(EntityManager $manager, ClientService $clientService)
77
-    {
75
+    public function __construct(EntityManager $manager, ClientService $clientService) {
78 76
         parent::__construct($manager, OauthAccessToken::class);
79 77
         $this->clientService = $clientService;
80 78
     }
Please login to merge, or discard this patch.
src/OAuth2/Entity/OauthAuthorizationCode.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@
 block discarded – undo
14 14
 class OauthAuthorizationCode extends Entity
15 15
 {
16 16
     /**
17
-    * {@inheritdoc}
18
-    */
17
+     * {@inheritdoc}
18
+     */
19 19
     public static function mapEntity(EntityMapperInterface $mapper): void
20 20
     {
21
-         $mapper->primaryKey('authorization_code');
22
-         $mapper->useTimestamp();
23
-         $mapper->casts([
21
+            $mapper->primaryKey('authorization_code');
22
+            $mapper->useTimestamp();
23
+            $mapper->casts([
24 24
             'expires' => 'date',
25 25
             'created_at' => 'date',
26 26
             'updated_at' => '?date',
27
-         ]);
27
+            ]);
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
 * @class OauthAuthorizationCode
12 12
 * @package Platine\Framework\OAuth2\Entity
13 13
 */
14
-class OauthAuthorizationCode extends Entity
15
-{
14
+class OauthAuthorizationCode extends Entity {
16 15
     /**
17 16
     * {@inheritdoc}
18 17
     */
Please login to merge, or discard this patch.
src/OAuth2/Entity/OauthClient.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 class OauthClient extends Entity
15 15
 {
16 16
     /**
17
-    * {@inheritdoc}
18
-    */
17
+     * {@inheritdoc}
18
+     */
19 19
     public static function mapEntity(EntityMapperInterface $mapper): void
20 20
     {
21
-         $mapper->useTimestamp();
22
-         $mapper->casts([
21
+            $mapper->useTimestamp();
22
+            $mapper->casts([
23 23
             'created_at' => 'date',
24 24
             'updated_at' => '?date',
25
-         ]);
25
+            ]);
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
 * @class OauthClient
12 12
 * @package Platine\Framework\OAuth2\Entity
13 13
 */
14
-class OauthClient extends Entity
15
-{
14
+class OauthClient extends Entity {
16 15
     /**
17 16
     * {@inheritdoc}
18 17
     */
Please login to merge, or discard this patch.
src/OAuth2/Entity/OauthScope.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 class OauthScope extends Entity
15 15
 {
16 16
     /**
17
-    * {@inheritdoc}
18
-    */
17
+     * {@inheritdoc}
18
+     */
19 19
     public static function mapEntity(EntityMapperInterface $mapper): void
20 20
     {
21
-         $mapper->useTimestamp();
22
-         $mapper->casts([
21
+            $mapper->useTimestamp();
22
+            $mapper->casts([
23 23
             'created_at' => 'date',
24 24
             'updated_at' => '?date',
25
-         ]);
25
+            ]);
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
 * @class OauthScope
12 12
 * @package Platine\Framework\OAuth2\Entity
13 13
 */
14
-class OauthScope extends Entity
15
-{
14
+class OauthScope extends Entity {
16 15
     /**
17 16
     * {@inheritdoc}
18 17
     */
Please login to merge, or discard this patch.
src/OAuth2/Entity/OauthRefreshToken.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@
 block discarded – undo
14 14
 class OauthRefreshToken extends Entity
15 15
 {
16 16
     /**
17
-    * {@inheritdoc}
18
-    */
17
+     * {@inheritdoc}
18
+     */
19 19
     public static function mapEntity(EntityMapperInterface $mapper): void
20 20
     {
21
-         $mapper->primaryKey('refresh_token');
22
-         $mapper->useTimestamp();
23
-         $mapper->casts([
21
+            $mapper->primaryKey('refresh_token');
22
+            $mapper->useTimestamp();
23
+            $mapper->casts([
24 24
             'expires' => 'date',
25 25
             'created_at' => 'date',
26 26
             'updated_at' => '?date',
27
-         ]);
27
+            ]);
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
 * @class OauthRefreshToken
12 12
 * @package Platine\Framework\OAuth2\Entity
13 13
 */
14
-class OauthRefreshToken extends Entity
15
-{
14
+class OauthRefreshToken extends Entity {
16 15
     /**
17 16
     * {@inheritdoc}
18 17
     */
Please login to merge, or discard this patch.