Passed
Push — develop ( 36c2b4...1d782e )
by nguereza
03:02
created
src/Handler/Error/Renderer/AbstractErrorRenderer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @class AbstractErrorRenderer
56 56
  * @package Platine\Framework\Handler\Error\Renderer
57 57
  */
58
-abstract class AbstractErrorRenderer implements ErrorRenderInterface
59
-{
58
+abstract class AbstractErrorRenderer implements ErrorRenderInterface {
60 59
 
61 60
     /**
62 61
      * The default error title
Please login to merge, or discard this patch.
src/Handler/Error/ErrorHandlerInterface.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 ErrorHandlerInterface
57 57
  * @package Platine\Framework\Handler\Error
58 58
  */
59
-interface ErrorHandlerInterface
60
-{
59
+interface ErrorHandlerInterface {
61 60
 
62 61
     /**
63 62
      * Handle error and generate the response
Please login to merge, or discard this patch.
src/Handler/Error/ErrorHandler.php 1 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
  * @class ErrorHandler
62 62
  * @package Platine\Framework\Handler\Error
63 63
  */
64
-class ErrorHandler implements ErrorHandlerInterface
65
-{
64
+class ErrorHandler implements ErrorHandlerInterface {
66 65
 
67 66
     /**
68 67
      * The content type
@@ -122,8 +121,7 @@  discard block
 block discarded – undo
122 121
      * Create new instance
123 122
      * @param LoggerInterface $logger
124 123
      */
125
-    public function __construct(LoggerInterface $logger)
126
-    {
124
+    public function __construct(LoggerInterface $logger) {
127 125
         $this->logger = $logger;
128 126
 
129 127
         //Add default renderer
Please login to merge, or discard this patch.
src/Demo/Action/User/DetailAction.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
  * @package Platine\Framework\Demo\Action\User
64 64
  * @template T
65 65
  */
66
-class DetailAction implements RequestHandlerInterface
67
-{
66
+class DetailAction implements RequestHandlerInterface {
68 67
 
69 68
     /**
70 69
      * The logger instance
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,8 +135,8 @@
 block discarded – undo
135 135
     {
136 136
         $id = (int) $request->getAttribute('id');
137 137
         $user = $this->userRepository
138
-                     ->with('roles')
139
-                     ->find($id);
138
+                        ->with('roles')
139
+                        ->find($id);
140 140
         if (!$user) {
141 141
             $this->flash->setError($this->lang->tr('Can not find the user'));
142 142
             $this->logger->warning('Can not find user with id {id}', ['id' => $id]);
Please login to merge, or discard this patch.
src/Demo/Action/User/ListAction.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
  * @package Platine\Framework\Demo\Action\User
60 60
  * @template T
61 61
  */
62
-class ListAction implements RequestHandlerInterface
63
-{
62
+class ListAction implements RequestHandlerInterface {
64 63
     /**
65 64
      * The user repository
66 65
      * @var UserRepository
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -126,16 +126,16 @@
 block discarded – undo
126 126
 
127 127
         $currentPage = (int)$param->get('page', 1);
128 128
         $this->pagination->setTotalItems($totalItems)
129
-                         ->setCurrentPage($currentPage);
129
+                            ->setCurrentPage($currentPage);
130 130
         $limit = $this->pagination->getItemsPerPage();
131 131
         $offset = $this->pagination->getOffset();
132 132
         ////////// END PAGINATION //////////////////
133 133
 
134 134
         $users = $this->userRepository
135
-                                      ->limit($offset, $limit)
136
-                                      ->orderBy(['lastname', 'firstname'])
137
-                                      ->filters($filters)
138
-                                      ->all();
135
+                                        ->limit($offset, $limit)
136
+                                        ->orderBy(['lastname', 'firstname'])
137
+                                        ->filters($filters)
138
+                                        ->all();
139 139
 
140 140
         $statusList = [
141 141
             'D' => 'Deactive',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
                                             ->filter($filters)
125 125
                                             ->count('id');
126 126
 
127
-        $currentPage = (int)$param->get('page', 1);
127
+        $currentPage = (int) $param->get('page', 1);
128 128
         $this->pagination->setTotalItems($totalItems)
129 129
                          ->setCurrentPage($currentPage);
130 130
         $limit = $this->pagination->getItemsPerPage();
Please login to merge, or discard this patch.
src/Demo/Action/User/CreateAction.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
  * @package Platine\Framework\Demo\Action\User
71 71
  * @template T
72 72
  */
73
-class CreateAction implements RequestHandlerInterface
74
-{
73
+class CreateAction implements RequestHandlerInterface {
75 74
 
76 75
     /**
77 76
      * Logger instance
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
                 $this->template,
196 196
                 'user/create',
197 197
                 [
198
-                   'param' => $formParam,
199
-                   'status' => $statusList,
200
-                   'roles' => $roles
198
+                    'param' => $formParam,
199
+                    'status' => $statusList,
200
+                    'roles' => $roles
201 201
                 ]
202 202
             );
203 203
         }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             'role' => $formParam->getRole(),
218 218
         ]);
219 219
 
220
-         //Handle roles
220
+            //Handle roles
221 221
         $rolesId = $param->post('roles', []);
222 222
         if (!empty($rolesId)) {
223 223
             $selectedRoles = $this->roleRepository->findAll(...$rolesId);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                 $this->template,
235 235
                 'user/create',
236 236
                 [
237
-                   'param' => $formParam,
237
+                    'param' => $formParam,
238 238
                     'status' => $statusList,
239 239
                     'roles' => $roles
240 240
                 ]
Please login to merge, or discard this patch.
src/Demo/Action/User/LogoutAction.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
  * @package Platine\Framework\Demo\Action\User
60 60
  * @template T
61 61
  */
62
-class LogoutAction implements RequestHandlerInterface
63
-{
62
+class LogoutAction implements RequestHandlerInterface {
64 63
     /**
65 64
      * The route helper instance
66 65
      * @var RouteHelper
Please login to merge, or discard this patch.
src/Demo/Action/User/EditAction.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
      */
110 110
     protected RouteHelper $routeHelper;
111 111
 
112
-     /**
113
-     * The password hash to be used
114
-     * @var HashInterface
115
-     */
112
+        /**
113
+         * The password hash to be used
114
+         * @var HashInterface
115
+         */
116 116
     protected HashInterface $hash;
117 117
 
118 118
     /**
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
                 $this->template,
218 218
                 'user/edit',
219 219
                 [
220
-                   'param' => $formParam,
221
-                   'status' => $statusList,
222
-                   'roles' => $roles
220
+                    'param' => $formParam,
221
+                    'status' => $statusList,
222
+                    'roles' => $roles
223 223
                 ]
224 224
             );
225 225
         }
@@ -262,9 +262,9 @@  discard block
 block discarded – undo
262 262
                 $this->template,
263 263
                 'user/edit',
264 264
                 [
265
-                   'param' => $formParam,
266
-                   'status' => $statusList,
267
-                   'roles' => $roles
265
+                    'param' => $formParam,
266
+                    'status' => $statusList,
267
+                    'roles' => $roles
268 268
                 ]
269 269
             );
270 270
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
  * @package Platine\Framework\Demo\Action\User
71 71
  * @template T
72 72
  */
73
-class EditAction implements RequestHandlerInterface
74
-{
73
+class EditAction implements RequestHandlerInterface {
75 74
 
76 75
     /**
77 76
      * The logger instance
Please login to merge, or discard this patch.
src/Demo/Action/HomeAction.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
  * @package Platine\Framework\Demo\Action
60 60
  * @template T
61 61
  */
62
-class HomeAction implements RequestHandlerInterface
63
-{
62
+class HomeAction implements RequestHandlerInterface {
64 63
     /**
65 64
      * The template instance
66 65
      * @var Template
Please login to merge, or discard this patch.