@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | protected string $permission; |
68 | 68 | |
69 | 69 | /** |
70 | - * {@inheritdoc} |
|
71 | - */ |
|
70 | + * {@inheritdoc} |
|
71 | + */ |
|
72 | 72 | public function __construct(string $markup, array &$tokens, Parser $parser) |
73 | 73 | { |
74 | 74 | $lexer = new Lexer('/(\w+)/'); |
@@ -84,8 +84,8 @@ discard block |
||
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)) { |
@@ -58,8 +58,7 @@ discard block |
||
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 |
||
69 | 68 | /** |
70 | 69 | * {@inheritdoc} |
71 | 70 | */ |
72 | - public function __construct(string $markup, array &$tokens, Parser $parser) |
|
73 | - { |
|
71 | + public function __construct(string $markup, array &$tokens, Parser $parser) { |
|
74 | 72 | $lexer = new Lexer('/(\w+)/'); |
75 | 73 | if ($lexer->match($markup)) { |
76 | 74 | $this->permission = $lexer->getStringMatch(1); |
@@ -68,8 +68,8 @@ |
||
68 | 68 | protected string $name; |
69 | 69 | |
70 | 70 | /** |
71 | - * {@inheritdoc} |
|
72 | - */ |
|
71 | + * {@inheritdoc} |
|
72 | + */ |
|
73 | 73 | public function __construct(string $markup, array &$tokens, Parser $parser) |
74 | 74 | { |
75 | 75 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class RouteUrlTag |
60 | 60 | * @package Platine\Framework\Template\Tag |
61 | 61 | */ |
62 | -class RouteUrlTag extends AbstractTag |
|
63 | -{ |
|
62 | +class RouteUrlTag extends AbstractTag { |
|
64 | 63 | /** |
65 | 64 | * The name of the route |
66 | 65 | * @var string |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | /** |
71 | 70 | * {@inheritdoc} |
72 | 71 | */ |
73 | - public function __construct(string $markup, array &$tokens, Parser $parser) |
|
74 | - { |
|
72 | + public function __construct(string $markup, array &$tokens, Parser $parser) { |
|
75 | 73 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
76 | 74 | if ($lexer->match($markup)) { |
77 | 75 | $this->name = $lexer->getStringMatch(0); |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class SessionFlashTag |
60 | 60 | * @package Platine\Framework\Template\Tag |
61 | 61 | */ |
62 | -class SessionFlashTag extends AbstractTag |
|
63 | -{ |
|
62 | +class SessionFlashTag extends AbstractTag { |
|
64 | 63 | /** |
65 | 64 | * The key of the session |
66 | 65 | * @var string |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | /** |
71 | 70 | * {@inheritdoc} |
72 | 71 | */ |
73 | - public function __construct(string $markup, array &$tokens, Parser $parser) |
|
74 | - { |
|
72 | + public function __construct(string $markup, array &$tokens, Parser $parser) { |
|
75 | 73 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
76 | 74 | if ($lexer->match($markup)) { |
77 | 75 | $this->name = $lexer->getStringMatch(0); |
@@ -68,8 +68,8 @@ |
||
68 | 68 | protected string $name; |
69 | 69 | |
70 | 70 | /** |
71 | - * {@inheritdoc} |
|
72 | - */ |
|
71 | + * {@inheritdoc} |
|
72 | + */ |
|
73 | 73 | public function __construct(string $markup, array &$tokens, Parser $parser) |
74 | 74 | { |
75 | 75 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -68,8 +68,8 @@ |
||
68 | 68 | protected string $value; |
69 | 69 | |
70 | 70 | /** |
71 | - * {@inheritdoc} |
|
72 | - */ |
|
71 | + * {@inheritdoc} |
|
72 | + */ |
|
73 | 73 | public function __construct(string $markup, array &$tokens, Parser $parser) |
74 | 74 | { |
75 | 75 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class LangTag |
60 | 60 | * @package Platine\Framework\Template\Tag |
61 | 61 | */ |
62 | -class LangTag extends AbstractTag |
|
63 | -{ |
|
62 | +class LangTag extends AbstractTag { |
|
64 | 63 | /** |
65 | 64 | * Value to debug |
66 | 65 | * @var string |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | /** |
71 | 70 | * {@inheritdoc} |
72 | 71 | */ |
73 | - public function __construct(string $markup, array &$tokens, Parser $parser) |
|
74 | - { |
|
72 | + public function __construct(string $markup, array &$tokens, Parser $parser) { |
|
75 | 73 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
76 | 74 | if ($lexer->match($markup)) { |
77 | 75 | $this->value = $lexer->getStringMatch(0); |
@@ -61,8 +61,8 @@ |
||
61 | 61 | class CsrfTag extends AbstractTag |
62 | 62 | { |
63 | 63 | /** |
64 | - * {@inheritdoc} |
|
65 | - */ |
|
64 | + * {@inheritdoc} |
|
65 | + */ |
|
66 | 66 | public function __construct(string $markup, array &$tokens, Parser $parser) |
67 | 67 | { |
68 | 68 | parent::__construct($markup, $tokens, $parser); |
@@ -58,13 +58,11 @@ |
||
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, array &$tokens, Parser $parser) |
|
67 | - { |
|
65 | + public function __construct(string $markup, array &$tokens, Parser $parser) { |
|
68 | 66 | parent::__construct($markup, $tokens, $parser); |
69 | 67 | $this->extractAttributes($markup); |
70 | 68 | } |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class SessionTag |
60 | 60 | * @package Platine\Framework\Template\Tag |
61 | 61 | */ |
62 | -class SessionTag extends AbstractTag |
|
63 | -{ |
|
62 | +class SessionTag extends AbstractTag { |
|
64 | 63 | /** |
65 | 64 | * The key of the session |
66 | 65 | * @var string |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | /** |
71 | 70 | * {@inheritdoc} |
72 | 71 | */ |
73 | - public function __construct(string $markup, array &$tokens, Parser $parser) |
|
74 | - { |
|
72 | + public function __construct(string $markup, array &$tokens, Parser $parser) { |
|
75 | 73 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
76 | 74 | if ($lexer->match($markup)) { |
77 | 75 | $this->name = $lexer->getStringMatch(0); |
@@ -68,8 +68,8 @@ |
||
68 | 68 | protected string $name; |
69 | 69 | |
70 | 70 | /** |
71 | - * {@inheritdoc} |
|
72 | - */ |
|
71 | + * {@inheritdoc} |
|
72 | + */ |
|
73 | 73 | public function __construct(string $markup, array &$tokens, Parser $parser) |
74 | 74 | { |
75 | 75 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @package Platine\Framework\Http\Action |
62 | 62 | * @template T |
63 | 63 | */ |
64 | -abstract class BaseAction implements RequestHandlerInterface |
|
65 | -{ |
|
64 | +abstract class BaseAction implements RequestHandlerInterface { |
|
66 | 65 | /** |
67 | 66 | * The field to use in query |
68 | 67 | * @var string[] |
@@ -199,8 +198,7 @@ discard block |
||
199 | 198 | * Create new instance |
200 | 199 | * @param ActionHelper<T> $actionHelper |
201 | 200 | */ |
202 | - public function __construct(ActionHelper $actionHelper) |
|
203 | - { |
|
201 | + public function __construct(ActionHelper $actionHelper) { |
|
204 | 202 | $this->pagination = $actionHelper->getPagination(); |
205 | 203 | $this->sidebar = $actionHelper->getSidebar(); |
206 | 204 | $this->context = $actionHelper->getContext(); |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | */ |
84 | 84 | protected array $filters = []; |
85 | 85 | |
86 | - /** |
|
87 | - * The filters name maps |
|
88 | - * @var array<string, string> |
|
89 | - */ |
|
86 | + /** |
|
87 | + * The filters name maps |
|
88 | + * @var array<string, string> |
|
89 | + */ |
|
90 | 90 | protected array $filterMaps = []; |
91 | 91 | |
92 | 92 | /** |
@@ -156,27 +156,27 @@ discard block |
||
156 | 156 | protected Template $template; |
157 | 157 | |
158 | 158 | /** |
159 | - * The RouteHelper instance |
|
160 | - * @var RouteHelper |
|
161 | - */ |
|
159 | + * The RouteHelper instance |
|
160 | + * @var RouteHelper |
|
161 | + */ |
|
162 | 162 | protected RouteHelper $routeHelper; |
163 | 163 | |
164 | 164 | /** |
165 | - * The Flash instance |
|
166 | - * @var Flash |
|
167 | - */ |
|
165 | + * The Flash instance |
|
166 | + * @var Flash |
|
167 | + */ |
|
168 | 168 | protected Flash $flash; |
169 | 169 | |
170 | 170 | /** |
171 | - * The Lang instance |
|
172 | - * @var Lang |
|
173 | - */ |
|
171 | + * The Lang instance |
|
172 | + * @var Lang |
|
173 | + */ |
|
174 | 174 | protected Lang $lang; |
175 | 175 | |
176 | 176 | /** |
177 | - * The LoggerInterface instance |
|
178 | - * @var LoggerInterface |
|
179 | - */ |
|
177 | + * The LoggerInterface instance |
|
178 | + * @var LoggerInterface |
|
179 | + */ |
|
180 | 180 | protected LoggerInterface $logger; |
181 | 181 | |
182 | 182 | /** |
@@ -560,10 +560,10 @@ discard block |
||
560 | 560 | { |
561 | 561 | } |
562 | 562 | |
563 | - /** |
|
564 | - * Ignore date filters if one of the given filters is present |
|
565 | - * @return array<string> $filters |
|
566 | - */ |
|
563 | + /** |
|
564 | + * Ignore date filters if one of the given filters is present |
|
565 | + * @return array<string> $filters |
|
566 | + */ |
|
567 | 567 | protected function getIgnoreDateFilters(): array |
568 | 568 | { |
569 | 569 | return []; |
@@ -607,19 +607,19 @@ discard block |
||
607 | 607 | ): void { |
608 | 608 | if ($this->all === false) { |
609 | 609 | $totalItems = $repository->filters($this->filters) |
610 | - ->query() |
|
611 | - ->count('id'); |
|
610 | + ->query() |
|
611 | + ->count('id'); |
|
612 | 612 | |
613 | 613 | $currentPage = (int) $this->param->get('page', 1); |
614 | 614 | |
615 | 615 | $this->pagination->setTotalItems($totalItems) |
616 | - ->setCurrentPage($currentPage); |
|
616 | + ->setCurrentPage($currentPage); |
|
617 | 617 | |
618 | 618 | $limit = $this->pagination->getItemsPerPage(); |
619 | 619 | $offset = $this->pagination->getOffset(); |
620 | 620 | |
621 | 621 | $query = $query->limit($limit) |
622 | - ->offset($offset); |
|
622 | + ->offset($offset); |
|
623 | 623 | } |
624 | 624 | |
625 | 625 | if (count($this->sorts) > 0) { |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $this->addContext('maintenance_state', app()->isInMaintenance()); |
317 | 317 | |
318 | 318 | // Set nonce for Content Security Policy |
319 | - $nonces = $this->request->getAttribute(SecurityPolicy::class); |
|
319 | + $nonces = $this->request->getAttribute(SecurityPolicy::class); |
|
320 | 320 | |
321 | 321 | if ($nonces !== null) { |
322 | 322 | $this->addContext('style_nonce', $nonces['nonces']['style']); |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | protected function handleRestPagination( |
603 | 603 | RepositoryInterface $repository, |
604 | 604 | EntityQuery $query, |
605 | - string|array $sortFields = 'name', |
|
605 | + string | array $sortFields = 'name', |
|
606 | 606 | string $sortDir = 'ASC' |
607 | 607 | ): void { |
608 | 608 | if ($this->all === false) { |
@@ -41,8 +41,7 @@ |
||
41 | 41 | * @class BaseResourceAction |
42 | 42 | * @package Platine\Framework\Http\Action |
43 | 43 | */ |
44 | -class BaseResourceAction extends BaseAction |
|
45 | -{ |
|
44 | +class BaseResourceAction extends BaseAction { |
|
46 | 45 | /** |
47 | 46 | * Return the response |
48 | 47 | * @return ResponseInterface |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | abstract class BaseConfigurationAction extends BaseAction |
46 | 46 | { |
47 | 47 | /** |
48 | - * {@inheritdoc} |
|
49 | - */ |
|
48 | + * {@inheritdoc} |
|
49 | + */ |
|
50 | 50 | public function __construct( |
51 | 51 | ActionHelper $actionHelper, |
52 | 52 | protected AppDatabaseConfig $dbConfig, |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | - * {@inheritdoc} |
|
59 | - */ |
|
58 | + * {@inheritdoc} |
|
59 | + */ |
|
60 | 60 | public function respond(): ResponseInterface |
61 | 61 | { |
62 | 62 | $this->setView($this->getViewName()); |
@@ -42,8 +42,7 @@ |
||
42 | 42 | * @class BaseConfigurationAction |
43 | 43 | * @package Platine\Framework\Http\Action |
44 | 44 | */ |
45 | -abstract class BaseConfigurationAction extends BaseAction |
|
46 | -{ |
|
45 | +abstract class BaseConfigurationAction extends BaseAction { |
|
47 | 46 | /** |
48 | 47 | * {@inheritdoc} |
49 | 48 | */ |