Test Failed
Push — develop ( df8064...70abbc )
by nguereza
03:01
created
src/App/Application.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -212,10 +212,10 @@
 block discarded – undo
212 212
         return $this;
213 213
     }
214 214
 
215
-     /**
216
-     * Return the application root path
217
-     * @return string
218
-     */
215
+        /**
216
+         * Return the application root path
217
+         * @return string
218
+         */
219 219
     public function getAppPath(): string
220 220
     {
221 221
         return $this->appPath;
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
  * @class Application
66 66
  * @package Platine\Framework\App
67 67
  */
68
-class Application extends Container
69
-{
68
+class Application extends Container {
70 69
     /**
71 70
      * The application version
72 71
      */
@@ -148,8 +147,7 @@  discard block
 block discarded – undo
148 147
      * Create new instance
149 148
      * @param string $basePath
150 149
      */
151
-    public function __construct(string $basePath = '')
152
-    {
150
+    public function __construct(string $basePath = '') {
153 151
         parent::__construct();
154 152
 
155 153
         $this->basePath = $basePath;
@@ -244,8 +242,7 @@  discard block
 block discarded – undo
244 242
      * @param string $env
245 243
      * @return $this
246 244
      */
247
-    public function setEnvironment(string $env)
248
-    {
245
+    public function setEnvironment(string $env) {
249 246
         $this->env = $env;
250 247
 
251 248
         return $this;
Please login to merge, or discard this patch.
src/Auth/AuthorizationInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class AuthorizationInterface
52 52
  * @package Platine\Framework\Auth
53 53
  */
54
-interface AuthorizationInterface
55
-{
54
+interface AuthorizationInterface {
56 55
     /**
57 56
      * Check if user is granted the given permission
58 57
      * @param string $permission the permission to check
Please login to merge, or discard this patch.
src/Auth/AuthenticationInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * @class AuthenticationInterface
57 57
  * @package Platine\Framework\Auth
58 58
  */
59
-interface AuthenticationInterface
60
-{
59
+interface AuthenticationInterface {
61 60
     /**
62 61
      * Authenticate the user
63 62
      * @param array<string, mixed> $credentials
Please login to merge, or discard this patch.
src/Auth/Authentication/JWTAuthentication.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
  * @package Platine\Framework\Auth\Authentication
70 70
  * @template T
71 71
  */
72
-class JWTAuthentication implements ApiAuthenticationInterface
73
-{
72
+class JWTAuthentication implements ApiAuthenticationInterface {
74 73
     /**
75 74
      * The JWT instance
76 75
      * @var JWT
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -248,12 +248,12 @@  discard block
 block discarded – undo
248 248
         $tokenExpire = time() + $expire;
249 249
         $refreshTokenExpire = time() + $refreshExpire;
250 250
         $this->jwt->setSecret($secret)
251
-                  ->setPayload([
252
-                      'sub' => $user->id,
253
-                      'exp' => $tokenExpire,
254
-                      'permissions' => $permissions,
255
-                  ])
256
-                  ->sign();
251
+                    ->setPayload([
252
+                        'sub' => $user->id,
253
+                        'exp' => $tokenExpire,
254
+                        'permissions' => $permissions,
255
+                    ])
256
+                    ->sign();
257 257
         $refreshToken = bin2hex(random_bytes(20));
258 258
         $jwtToken = $this->jwt->getToken();
259 259
 
@@ -267,16 +267,16 @@  discard block
 block discarded – undo
267 267
         $this->tokenRepository->save($token);
268 268
 
269 269
         $data = [
270
-          'user' => [
270
+            'user' => [
271 271
             'id' => $user->id,
272 272
             'username' => $user->username,
273 273
             'lastname' => $user->lastname,
274 274
             'firstname' => $user->firstname,
275 275
             'email' => $user->email,
276 276
             'permissions' => $permissions,
277
-          ],
278
-          'token' => $jwtToken,
279
-          'refresh_token' => $refreshToken,
277
+            ],
278
+            'token' => $jwtToken,
279
+            'refresh_token' => $refreshToken,
280 280
         ];
281 281
 
282 282
         return array_merge($data, $this->getUserData($user, $token));
Please login to merge, or discard this patch.
src/Auth/Authentication/SessionAuthentication.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
  * class SessionAuthentication
64 64
  * @package Platine\Framework\Auth\Authentication
65 65
  */
66
-class SessionAuthentication implements AuthenticationInterface
67
-{
66
+class SessionAuthentication implements AuthenticationInterface {
68 67
     /**
69 68
      * The session instance to use
70 69
      * @var Session
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -185,11 +185,11 @@
 block discarded – undo
185 185
         }
186 186
 
187 187
         $data = [
188
-          'id' => $user->id,
189
-          'username' => $user->username,
190
-          'lastname' => $user->lastname,
191
-          'firstname' => $user->firstname,
192
-          'permissions' => array_unique($permissions),
188
+            'id' => $user->id,
189
+            'username' => $user->username,
190
+            'lastname' => $user->lastname,
191
+            'firstname' => $user->firstname,
192
+            'permissions' => array_unique($permissions),
193 193
         ];
194 194
 
195 195
         $this->session->set('user', array_merge($data, $this->getUserData($user)));
Please login to merge, or discard this patch.
src/Auth/Authorization/SessionAuthorization.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * class SessionAuthorization
55 55
  * @package Platine\Framework\Auth\Authorization
56 56
  */
57
-class SessionAuthorization implements AuthorizationInterface
58
-{
57
+class SessionAuthorization implements AuthorizationInterface {
59 58
     /**
60 59
      * The session instance to use
61 60
      * @var Session
Please login to merge, or discard this patch.
src/Auth/ApiAuthenticationInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
  * @class ApiAuthenticationInterface
58 58
  * @package Platine\Framework\Auth
59 59
  */
60
-interface ApiAuthenticationInterface
61
-{
60
+interface ApiAuthenticationInterface {
62 61
     /**
63 62
      * Whether the request is authenticated
64 63
      * @param ServerRequestInterface $request
Please login to merge, or discard this patch.
src/Audit/Model/Audit.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,19 +66,19 @@
 block discarded – undo
66 66
             'date' => 'date',
67 67
         ]);
68 68
 
69
-        $mapper->filter('start_date', function (Query $q, $value) {
69
+        $mapper->filter('start_date', function(Query $q, $value) {
70 70
             $q->where('date')->gte($value);
71 71
         });
72 72
 
73
-        $mapper->filter('end_date', function (Query $q, $value) {
73
+        $mapper->filter('end_date', function(Query $q, $value) {
74 74
             $q->where('date')->lte($value);
75 75
         });
76 76
 
77
-        $mapper->filter('event', function (Query $q, $value) {
77
+        $mapper->filter('event', function(Query $q, $value) {
78 78
             $q->where('event')->is($value);
79 79
         });
80 80
 
81
-        $mapper->filter('user', function (Query $q, $value) {
81
+        $mapper->filter('user', function(Query $q, $value) {
82 82
             $q->where('user_id')->is($value);
83 83
         });
84 84
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
  * @package Platine\Framework\Audit\Model
58 58
  * @extends Entity<Audit>
59 59
  */
60
-class Audit extends Entity
61
-{
60
+class Audit extends Entity {
62 61
     /**
63 62
      *
64 63
      * @param EntityMapperInterface<Audit> $mapper
Please login to merge, or discard this patch.
src/Audit/Auditor.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
  * @class Auditor
60 60
  * @package Platine\Framework\Audit
61 61
  */
62
-class Auditor
63
-{
62
+class Auditor {
64 63
     /**
65 64
      * The audit repository
66 65
      * @var AuditRepository
Please login to merge, or discard this patch.