Passed
Push — develop ( e3e306...5da5fd )
by nguereza
04:19 queued 01:01
created
src/Http/Action/CrudAction.php 2 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -71,45 +71,45 @@  discard block
 block discarded – undo
71 71
 class CrudAction
72 72
 {
73 73
     /**
74
-    * The Lang instance
75
-    * @var Lang
76
-    */
74
+     * The Lang instance
75
+     * @var Lang
76
+     */
77 77
     protected Lang $lang;
78 78
 
79 79
     /**
80
-    * The Pagination instance
81
-    * @var Pagination
82
-    */
80
+     * The Pagination instance
81
+     * @var Pagination
82
+     */
83 83
     protected Pagination $pagination;
84 84
 
85 85
     /**
86
-    * The Template instance
87
-    * @var Template
88
-    */
86
+     * The Template instance
87
+     * @var Template
88
+     */
89 89
     protected Template $template;
90 90
 
91 91
     /**
92
-    * The Flash instance
93
-    * @var Flash
94
-    */
92
+     * The Flash instance
93
+     * @var Flash
94
+     */
95 95
     protected Flash $flash;
96 96
 
97 97
     /**
98
-    * The RouteHelper instance
99
-    * @var RouteHelper
100
-    */
98
+     * The RouteHelper instance
99
+     * @var RouteHelper
100
+     */
101 101
     protected RouteHelper $routeHelper;
102 102
 
103 103
     /**
104
-    * The LoggerInterface instance
105
-    * @var LoggerInterface
106
-    */
104
+     * The LoggerInterface instance
105
+     * @var LoggerInterface
106
+     */
107 107
     protected LoggerInterface $logger;
108 108
 
109 109
     /**
110
-    * The Repository instance
111
-    * @var Repository<TEntity>
112
-    */
110
+     * The Repository instance
111
+     * @var Repository<TEntity>
112
+     */
113 113
     protected Repository $repository;
114 114
 
115 115
     /**
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
     protected string $validatorClass;
198 198
 
199 199
     /**
200
-    * Create new instance
201
-    * @param Lang $lang
202
-    * @param Pagination $pagination
203
-    * @param Template $template
204
-    * @param Flash $flash
205
-    * @param RouteHelper $routeHelper
206
-    * @param LoggerInterface $logger
207
-    */
200
+     * Create new instance
201
+     * @param Lang $lang
202
+     * @param Pagination $pagination
203
+     * @param Template $template
204
+     * @param Flash $flash
205
+     * @param RouteHelper $routeHelper
206
+     * @param LoggerInterface $logger
207
+     */
208 208
     public function __construct(
209 209
         Lang $lang,
210 210
         Pagination $pagination,
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
     }
223 223
 
224 224
     /**
225
-    * List all entities
226
-    * @param ServerRequestInterface $request
227
-    * @return ResponseInterface
228
-    */
225
+     * List all entities
226
+     * @param ServerRequestInterface $request
227
+     * @return ResponseInterface
228
+     */
229 229
     public function index(ServerRequestInterface $request): ResponseInterface
230 230
     {
231 231
         $context = $this->getTemplateData();
@@ -237,14 +237,14 @@  discard block
 block discarded – undo
237 237
         $currentPage = (int) $param->get('page', 1);
238 238
 
239 239
         $this->pagination->setTotalItems($totalItems)
240
-                         ->setCurrentPage($currentPage);
240
+                            ->setCurrentPage($currentPage);
241 241
 
242 242
         $limit = $this->pagination->getItemsPerPage();
243 243
         $offset = $this->pagination->getOffset();
244 244
 
245 245
         $query = $this->repository->query();
246 246
         $query->offset($offset)
247
-               ->limit($limit);
247
+                ->limit($limit);
248 248
 
249 249
         if (count($this->orderFields) > 0) {
250 250
             foreach ($this->orderFields as $field => $dir) {
@@ -270,10 +270,10 @@  discard block
 block discarded – undo
270 270
     }
271 271
 
272 272
     /**
273
-    * List entity detail
274
-    * @param ServerRequestInterface $request
275
-    * @return ResponseInterface
276
-    */
273
+     * List entity detail
274
+     * @param ServerRequestInterface $request
275
+     * @return ResponseInterface
276
+     */
277 277
     public function detail(ServerRequestInterface $request): ResponseInterface
278 278
     {
279 279
         $routeListName = sprintf('%s_list', $this->routePrefix);
@@ -301,10 +301,10 @@  discard block
 block discarded – undo
301 301
     }
302 302
 
303 303
     /**
304
-    * Create new entity
305
-    * @param ServerRequestInterface $request
306
-    * @return ResponseInterface
307
-    */
304
+     * Create new entity
305
+     * @param ServerRequestInterface $request
306
+     * @return ResponseInterface
307
+     */
308 308
     public function create(ServerRequestInterface $request): ResponseInterface
309 309
     {
310 310
         $routeListName = sprintf('%s_list', $this->routePrefix);
@@ -378,10 +378,10 @@  discard block
 block discarded – undo
378 378
     }
379 379
 
380 380
     /**
381
-    * Update existing entity
382
-    * @param ServerRequestInterface $request
383
-    * @return ResponseInterface
384
-    */
381
+     * Update existing entity
382
+     * @param ServerRequestInterface $request
383
+     * @return ResponseInterface
384
+     */
385 385
     public function update(ServerRequestInterface $request): ResponseInterface
386 386
     {
387 387
         $routeListName = sprintf('%s_list', $this->routePrefix);
@@ -467,10 +467,10 @@  discard block
 block discarded – undo
467 467
     }
468 468
 
469 469
     /**
470
-    * Delete the entity
471
-    * @param ServerRequestInterface $request
472
-    * @return ResponseInterface
473
-    */
470
+     * Delete the entity
471
+     * @param ServerRequestInterface $request
472
+     * @return ResponseInterface
473
+     */
474 474
     public function delete(ServerRequestInterface $request): ResponseInterface
475 475
     {
476 476
         $routeListName = sprintf('%s_list', $this->routePrefix);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
 * @package Platine\Framework\Http\Action
69 69
 * @template TEntity as \Platine\Orm\Entity
70 70
 */
71
-class CrudAction
72
-{
71
+class CrudAction {
73 72
     /**
74 73
     * The Lang instance
75 74
     * @var Lang
Please login to merge, or discard this patch.
src/Console/BaseMakeActionCommand.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 BaseMakeActionCommand
60 60
  * @package Platine\Framework\Console
61 61
  */
62
-abstract class BaseMakeActionCommand extends MakeCommand
63
-{
62
+abstract class BaseMakeActionCommand extends MakeCommand {
64 63
     /**
65 64
      * The form parameter class name
66 65
      * @var class-string
Please login to merge, or discard this patch.
src/Console/Command/MakeResourceActionCommand.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     ) {
84 84
         parent::__construct($application, $filesystem);
85 85
         $this->setName('make:resource')
86
-              ->setDescription('Command to generate platine resource action');
86
+                ->setDescription('Command to generate platine resource action');
87 87
     }
88 88
 
89 89
     /**
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
         $this->addProperty($this->repositoryClass);
105 105
     }
106 106
 
107
-     /**
108
-     * {@inheritdoc}
109
-     */
107
+        /**
108
+         * {@inheritdoc}
109
+         */
110 110
     public function getClassTemplate(): string
111 111
     {
112 112
         return <<<EOF
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@
 block discarded – undo
65 65
  * @class MakeResourceActionCommand
66 66
  * @package Platine\Framework\Console\Command
67 67
  */
68
-class MakeResourceActionCommand extends BaseMakeActionCommand
69
-{
68
+class MakeResourceActionCommand extends BaseMakeActionCommand {
70 69
     /**
71 70
      * {@inheritdoc}
72 71
      */
Please login to merge, or discard this patch.
src/Console/Command/MakeCrudActionCommand.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,12 +74,12 @@
 block discarded – undo
74 74
     ) {
75 75
         parent::__construct($application, $filesystem);
76 76
         $this->setName('make:crud')
77
-              ->setDescription('Command to generate platine CRUD action');
77
+                ->setDescription('Command to generate platine CRUD action');
78 78
     }
79 79
 
80
-     /**
81
-     * {@inheritdoc}
82
-     */
80
+        /**
81
+         * {@inheritdoc}
82
+         */
83 83
     public function getClassTemplate(): string
84 84
     {
85 85
         return <<<EOF
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * @class MakeCrudActionCommand
57 57
  * @package Platine\Framework\Console\Command
58 58
  */
59
-class MakeCrudActionCommand extends BaseMakeActionCommand
60
-{
59
+class MakeCrudActionCommand extends BaseMakeActionCommand {
61 60
     /**
62 61
      * {@inheritdoc}
63 62
      */
Please login to merge, or discard this patch.
src/Template/Tag/PermissionTag.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     protected string $permission;
68 68
 
69 69
     /**
70
-    * {@inheritdoc}
71
-    */
70
+     * {@inheritdoc}
71
+     */
72 72
     public function __construct(string $markup, &$tokens, Parser $parser)
73 73
     {
74 74
         $lexer = new Lexer('/(\w+)/');
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
     }
85 85
 
86 86
     /**
87
-    * {@inheritdoc}
88
-    */
87
+     * {@inheritdoc}
88
+     */
89 89
     public function render(Context $context): string
90 90
     {
91 91
         if ($context->hasKey($this->permission)) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
  * @class PermissionTag
59 59
  * @package Platine\Framework\Template\Tag
60 60
  */
61
-class PermissionTag extends AbstractBlock
62
-{
61
+class PermissionTag extends AbstractBlock {
63 62
     /**
64 63
      * The code of the permission
65 64
      * @var string
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
     /**
70 69
     * {@inheritdoc}
71 70
     */
72
-    public function __construct(string $markup, &$tokens, Parser $parser)
73
-    {
71
+    public function __construct(string $markup, &$tokens, Parser $parser) {
74 72
         $lexer = new Lexer('/(\w+)/');
75 73
         if ($lexer->match($markup)) {
76 74
             $this->permission = $lexer->getStringMatch(1);
Please login to merge, or discard this patch.
src/Template/Tag/AuthTag.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 block discarded – undo
58 58
 class AuthTag extends AbstractBlock
59 59
 {
60 60
     /**
61
-    * {@inheritdoc}
62
-    */
61
+     * {@inheritdoc}
62
+     */
63 63
     public function render(Context $context): string
64 64
     {
65 65
         /** @var AuthenticationInterface $authentication */
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @class AuthTag
56 56
  * @package Platine\Framework\Template\Tag
57 57
  */
58
-class AuthTag extends AbstractBlock
59
-{
58
+class AuthTag extends AbstractBlock {
60 59
     /**
61 60
     * {@inheritdoc}
62 61
     */
Please login to merge, or discard this patch.
src/Template/Tag/CsrfTag.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@
 block discarded – undo
61 61
 class CsrfTag extends AbstractTag
62 62
 {
63 63
     /**
64
-    * {@inheritdoc}
65
-    */
64
+     * {@inheritdoc}
65
+     */
66 66
     public function __construct(string $markup, &$tokens, Parser $parser)
67 67
     {
68 68
         parent::__construct($markup, $tokens, $parser);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,13 +58,11 @@
 block discarded – undo
58 58
  * @package Platine\Framework\Template\Tag
59 59
  * @template T
60 60
  */
61
-class CsrfTag extends AbstractTag
62
-{
61
+class CsrfTag extends AbstractTag {
63 62
     /**
64 63
     * {@inheritdoc}
65 64
     */
66
-    public function __construct(string $markup, &$tokens, Parser $parser)
67
-    {
65
+    public function __construct(string $markup, &$tokens, Parser $parser) {
68 66
         parent::__construct($markup, $tokens, $parser);
69 67
         $this->extractAttributes($markup);
70 68
     }
Please login to merge, or discard this patch.
src/Http/RateLimit/Rate.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@
 block discarded – undo
103 103
         return new static($quota, 1);
104 104
     }
105 105
 
106
-     /**
107
-     * Set quota to be used per minute
108
-     * @param int $quota
109
-     * @return self
110
-     */
106
+        /**
107
+         * Set quota to be used per minute
108
+         * @param int $quota
109
+         * @return self
110
+         */
111 111
     public static function perMinute(int $quota): self
112 112
     {
113 113
         return new static($quota, 60);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * @class Rate
54 54
  * @package Platine\Framework\Http\RateLimit
55 55
  */
56
-class Rate
57
-{
56
+class Rate {
58 57
     /**
59 58
      * The rate limit quota
60 59
      * @var int
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
      * @param int $quota
74 73
      * @param int $interval
75 74
      */
76
-    final protected function __construct(int $quota, int $interval)
77
-    {
75
+    final protected function __construct(int $quota, int $interval) {
78 76
         if ($quota <= 0) {
79 77
             throw new InvalidArgumentException(sprintf(
80 78
                 'Quota must be greater than zero, received [%d]',
Please login to merge, or discard this patch.
src/Http/RateLimit/Exception/LimitExceededException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
  * @class LimitExceededException
41 41
  * @package Platine\Framework\Http\RateLimit\Exception
42 42
  */
43
-class LimitExceededException extends RuntimeException
44
-{
43
+class LimitExceededException extends RuntimeException {
45 44
     /**
46 45
      * The identifier
47 46
      * @var string
Please login to merge, or discard this patch.