Passed
Push — develop ( e3e306...5da5fd )
by nguereza
04:19 queued 01:01
created
src/Console/Command/MakeTaskCommand.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     ) {
89 89
         parent::__construct($application, $filesystem);
90 90
         $this->setName('make:task')
91
-               ->setDescription('Command to generate new task class');
91
+                ->setDescription('Command to generate new task class');
92 92
     }
93 93
 
94 94
     /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
  * @class MakeTaskCommand
59 59
  * @package Platine\Framework\Console\Command
60 60
  */
61
-class MakeTaskCommand extends MakeCommand
62
-{
61
+class MakeTaskCommand extends MakeCommand {
63 62
     /**
64 63
      * {@inheritdoc}
65 64
      */
Please login to merge, or discard this patch.
src/Console/PasswordGenerateCommand.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
  * @class PasswordGenerateCommand
57 57
  * @package Platine\Framework\Console
58 58
  */
59
-class PasswordGenerateCommand extends Command
60
-{
59
+class PasswordGenerateCommand extends Command {
61 60
     /**
62 61
      * The Hash instance
63 62
      * @var HashInterface
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
     /**
86 85
      * {@inheritdoc}
87 86
      */
88
-    public function execute()
89
-    {
87
+    public function execute() {
90 88
         $io = $this->io();
91 89
         $writer = $io->writer();
92 90
         $password = $this->password;
Please login to merge, or discard this patch.
src/Console/Command/MakeEnumCommand.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
     ) {
83 83
         parent::__construct($application, $filesystem);
84 84
         $this->setName('make:enum')
85
-               ->setDescription('Command to generate new enumeration class');
85
+                ->setDescription('Command to generate new enumeration class');
86 86
     }
87 87
 
88 88
     /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
  * @class MakeEnumCommand
59 59
  * @package Platine\Framework\Console\Command
60 60
  */
61
-class MakeEnumCommand extends MakeCommand
62
-{
61
+class MakeEnumCommand extends MakeCommand {
63 62
     /**
64 63
      * {@inheritdoc}
65 64
      */
Please login to merge, or discard this patch.
src/Auth/Event/AuthLoginEvent.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * @class AuthLoginEvent
55 55
  * @package Platine\Framework\Auth\Event
56 56
  */
57
-class AuthLoginEvent extends Event
58
-{
57
+class AuthLoginEvent extends Event {
59 58
     /**
60 59
      * The authentication user
61 60
      * @var User
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      * Create new instance
67 66
      * @param User $user
68 67
      */
69
-    public function __construct(User $user)
70
-    {
68
+    public function __construct(User $user) {
71 69
         parent::__construct(__CLASS__, []);
72 70
         $this->user = $user;
73 71
     }
Please login to merge, or discard this patch.
src/Service/Provider/OAuth2ServiceProvider.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@
 block discarded – undo
94 94
  * @class OAuth2ServiceProvider
95 95
  * @package Platine\App\Provider
96 96
  */
97
-class OAuth2ServiceProvider extends ServiceProvider
98
-{
97
+class OAuth2ServiceProvider extends ServiceProvider {
99 98
     /**
100 99
      * {@inheritdoc}
101 100
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $this->app->bind(UserAuthenticationInterface::class, UserAuthentication::class);
106 106
 
107 107
         // Configuration
108
-        $this->app->bind(Configuration::class, function (ContainerInterface $app) {
108
+        $this->app->bind(Configuration::class, function(ContainerInterface $app) {
109 109
             return new Configuration($app->get(Config::class)->get('oauth2', []));
110 110
         });
111 111
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function addRoutes(Router $router): void
166 166
     {
167
-        $router->group('/oauth2', function (Router $router) {
167
+        $router->group('/oauth2', function(Router $router) {
168 168
             $router->post('/token', AccessTokenRequestHandler::class, 'oauth2_access_token');
169 169
             $router->add('/authorize', AuthorizationRequestHandler::class, ['GET', 'POST'], 'oauth2_authorization_code');
170 170
             $router->post('/revocation', TokenRevocationRequestHandler::class, 'oauth2_revoke_access_token');
Please login to merge, or discard this patch.
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
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * @package Platine\Framework\OAuth2\Repository
62 62
  * @extends Repository<OauthAuthorizationCode>
63 63
  */
64
-class AuthorizationCodeRepository extends Repository implements AuthorizationCodeRepositoryInterface
65
-{
64
+class AuthorizationCodeRepository extends Repository implements AuthorizationCodeRepositoryInterface {
66 65
     /**
67 66
      * The Client Service
68 67
      * @var ClientService
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
      * @param EntityManager<OauthAuthorizationCode> $manager
75 74
      * @param ClientService $clientService
76 75
      */
77
-    public function __construct(EntityManager $manager, ClientService $clientService)
78
-    {
76
+    public function __construct(EntityManager $manager, ClientService $clientService) {
79 77
         parent::__construct($manager, OauthAuthorizationCode::class);
80 78
         $this->clientService = $clientService;
81 79
     }
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
@@ -58,14 +58,12 @@
 block discarded – undo
58 58
  * @package Platine\Framework\OAuth2\Repository
59 59
  * @extends Repository<OauthScope>
60 60
  */
61
-class ScopeRepository extends Repository implements ScopeRepositoryInterface
62
-{
61
+class ScopeRepository extends Repository implements ScopeRepositoryInterface {
63 62
     /**
64 63
      * Create new instance
65 64
      * @param EntityManager<OauthScope> $manager
66 65
      */
67
-    public function __construct(EntityManager $manager)
68
-    {
66
+    public function __construct(EntityManager $manager) {
69 67
         parent::__construct($manager, OauthScope::class);
70 68
     }
71 69
 
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
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * @package Platine\Framework\OAuth2\Repository
62 62
  * @extends Repository<OauthRefreshToken>
63 63
  */
64
-class RefreshTokenRepository extends Repository implements RefreshTokenRepositoryInterface
65
-{
64
+class RefreshTokenRepository extends Repository implements RefreshTokenRepositoryInterface {
66 65
     /**
67 66
      * The Client Service
68 67
      * @var ClientService
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
      * @param EntityManager<OauthRefreshToken> $manager
75 74
      * @param ClientService $clientService
76 75
      */
77
-    public function __construct(EntityManager $manager, ClientService $clientService)
78
-    {
76
+    public function __construct(EntityManager $manager, ClientService $clientService) {
79 77
         parent::__construct($manager, OauthRefreshToken::class);
80 78
         $this->clientService = $clientService;
81 79
     }
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
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * @package Platine\Framework\OAuth2\Repository
62 62
  * @extends Repository<OauthAccessToken>
63 63
  */
64
-class AccessTokenRepository extends Repository implements AccessTokenRepositoryInterface
65
-{
64
+class AccessTokenRepository extends Repository implements AccessTokenRepositoryInterface {
66 65
     /**
67 66
      * The Client Service
68 67
      * @var ClientService
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
      * @param EntityManager<OauthAccessToken> $manager
75 74
      * @param ClientService $clientService
76 75
      */
77
-    public function __construct(EntityManager $manager, ClientService $clientService)
78
-    {
76
+    public function __construct(EntityManager $manager, ClientService $clientService) {
79 77
         parent::__construct($manager, OauthAccessToken::class);
80 78
         $this->clientService = $clientService;
81 79
     }
Please login to merge, or discard this patch.