@@ -25,8 +25,8 @@ |
||
25 | 25 | protected string $path; |
26 | 26 | |
27 | 27 | /** |
28 | - * {@inheritdoc} |
|
29 | - */ |
|
28 | + * {@inheritdoc} |
|
29 | + */ |
|
30 | 30 | public function __construct(string $markup, &$tokens, Parser $parser) |
31 | 31 | { |
32 | 32 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class StaticTag |
60 | 60 | * @package Platine\Framework\Template\Tag |
61 | 61 | */ |
62 | -class StaticTag extends AbstractTag |
|
63 | -{ |
|
62 | +class StaticTag extends AbstractTag { |
|
64 | 63 | /** |
65 | 64 | * The static path |
66 | 65 | * @var string |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | /** |
71 | 70 | * {@inheritdoc} |
72 | 71 | */ |
73 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
74 | - { |
|
72 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
75 | 73 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
76 | 74 | if ($lexer->match($markup)) { |
77 | 75 | $this->path = $lexer->getStringMatch(0); |
@@ -26,8 +26,8 @@ |
||
26 | 26 | protected string $name; |
27 | 27 | |
28 | 28 | /** |
29 | - * {@inheritdoc} |
|
30 | - */ |
|
29 | + * {@inheritdoc} |
|
30 | + */ |
|
31 | 31 | public function __construct(string $markup, &$tokens, Parser $parser) |
32 | 32 | { |
33 | 33 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -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, &$tokens, Parser $parser) |
|
74 | - { |
|
72 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
75 | 73 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
76 | 74 | if ($lexer->match($markup)) { |
77 | 75 | $this->name = $lexer->getStringMatch(0); |
@@ -26,8 +26,8 @@ |
||
26 | 26 | protected string $name; |
27 | 27 | |
28 | 28 | /** |
29 | - * {@inheritdoc} |
|
30 | - */ |
|
29 | + * {@inheritdoc} |
|
30 | + */ |
|
31 | 31 | public function __construct(string $markup, &$tokens, Parser $parser) |
32 | 32 | { |
33 | 33 | $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, &$tokens, Parser $parser) |
|
74 | - { |
|
72 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
75 | 73 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
76 | 74 | if ($lexer->match($markup)) { |
77 | 75 | $this->name = $lexer->getStringMatch(0); |
@@ -212,10 +212,10 @@ |
||
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; |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | * @return EventInterface |
402 | 402 | */ |
403 | 403 | public function dispatch( |
404 | - string|EventInterface $eventName, |
|
404 | + string | EventInterface $eventName, |
|
405 | 405 | ?EventInterface $event = null |
406 | 406 | ): EventInterface { |
407 | 407 | return $this->dispatcher->dispatch($eventName, $event); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | */ |
419 | 419 | public function listen( |
420 | 420 | string $eventName, |
421 | - ListenerInterface|callable|string $listener, |
|
421 | + ListenerInterface | callable | string $listener, |
|
422 | 422 | int $priority = DispatcherInterface::PRIORITY_DEFAULT |
423 | 423 | ): self { |
424 | 424 | if (is_string($listener)) { |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | * @return ServiceProvider |
504 | 504 | */ |
505 | 505 | public function registerServiceProvider( |
506 | - string|ServiceProvider $provider, |
|
506 | + string | ServiceProvider $provider, |
|
507 | 507 | bool $force = false |
508 | 508 | ): ServiceProvider { |
509 | 509 | $registered = $this->getServiceProvider($provider); |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | * @param string|ServiceProvider $provider |
532 | 532 | * @return ServiceProvider|null |
533 | 533 | */ |
534 | - public function getServiceProvider(string|ServiceProvider $provider): ?ServiceProvider |
|
534 | + public function getServiceProvider(string | ServiceProvider $provider): ?ServiceProvider |
|
535 | 535 | { |
536 | 536 | $name = is_string($provider) |
537 | 537 | ? $provider |
@@ -67,8 +67,7 @@ discard block |
||
67 | 67 | * @class Application |
68 | 68 | * @package Platine\Framework\App |
69 | 69 | */ |
70 | -class Application extends Container |
|
71 | -{ |
|
70 | +class Application extends Container { |
|
72 | 71 | /** |
73 | 72 | * The application version |
74 | 73 | */ |
@@ -156,8 +155,7 @@ discard block |
||
156 | 155 | * Create new instance |
157 | 156 | * @param string $basePath |
158 | 157 | */ |
159 | - public function __construct(string $basePath = '') |
|
160 | - { |
|
158 | + public function __construct(string $basePath = '') { |
|
161 | 159 | parent::__construct(); |
162 | 160 | |
163 | 161 | $this->basePath = $basePath; |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $config = $app->get(Config::class); |
88 | 88 | |
89 | 89 | $pagination->setItemsPerPage($config->get('pagination.item_per_page', 10)) |
90 | - ->setMaxPages($config->get('pagination.max_pages', 5)); |
|
90 | + ->setMaxPages($config->get('pagination.max_pages', 5)); |
|
91 | 91 | |
92 | 92 | return $pagination; |
93 | 93 | }); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function register(): void |
71 | 71 | { |
72 | - $this->app->bind(UrlGeneratorInterface::class, function (ContainerInterface $app) { |
|
72 | + $this->app->bind(UrlGeneratorInterface::class, function(ContainerInterface $app) { |
|
73 | 73 | return new ServerRequestUrlGenerator( |
74 | 74 | $app->get(ServerRequestInterface::class), |
75 | 75 | 'page' |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $this->app->bind(RendererInterface::class, BootstrapRenderer::class); |
80 | 80 | |
81 | - $this->app->bind(Pagination::class, function (ContainerInterface $app) { |
|
81 | + $this->app->bind(Pagination::class, function(ContainerInterface $app) { |
|
82 | 82 | $pagination = new Pagination( |
83 | 83 | $app->get(UrlGeneratorInterface::class), |
84 | 84 | $app->get(RendererInterface::class) |
@@ -61,8 +61,7 @@ |
||
61 | 61 | * @class PaginationServiceProvider |
62 | 62 | * @package Platine\Framework\Service\Provider |
63 | 63 | */ |
64 | -class PaginationServiceProvider extends ServiceProvider |
|
65 | -{ |
|
64 | +class PaginationServiceProvider extends ServiceProvider { |
|
66 | 65 | /** |
67 | 66 | * {@inheritdoc} |
68 | 67 | */ |
@@ -71,7 +71,7 @@ |
||
71 | 71 | 'updated_at' => '?date', |
72 | 72 | ]); |
73 | 73 | |
74 | - $mapper->filter('status', function (Query $q, $status) { |
|
74 | + $mapper->filter('status', function(Query $q, $status) { |
|
75 | 75 | $q->where('status')->is($status); |
76 | 76 | }); |
77 | 77 | } |
@@ -57,8 +57,7 @@ |
||
57 | 57 | * @package Platine\Framework\Auth\Entity |
58 | 58 | * @extends Entity<User> |
59 | 59 | */ |
60 | -class User extends Entity implements IdentityInterface |
|
61 | -{ |
|
60 | +class User extends Entity implements IdentityInterface { |
|
62 | 61 | /** |
63 | 62 | * |
64 | 63 | * @param EntityMapperInterface<User> $mapper |
@@ -79,8 +79,8 @@ |
||
79 | 79 | foreach ($pages as $page) { |
80 | 80 | if ($page->getUrl() !== null) { |
81 | 81 | $html .= '<li class = "page-item' . ($page->isCurrent() ? ' active"' : '"') |
82 | - . '><a href = "' . $page->getUrl() . '" class="page-link">' |
|
83 | - . $page->getNumber() . '</a></li>'; |
|
82 | + . '><a href = "' . $page->getUrl() . '" class="page-link">' |
|
83 | + . $page->getNumber() . '</a></li>'; |
|
84 | 84 | } else { |
85 | 85 | $html .= '<li class = "page-item disabled"><a href="#" class="page-link">' |
86 | 86 | . $page->getNumber() . '</a></li>'; |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class BootstrapRenderer |
55 | 55 | * @package Platine\Framework\Pagination |
56 | 56 | */ |
57 | -class BootstrapRenderer implements RendererInterface |
|
58 | -{ |
|
57 | +class BootstrapRenderer implements RendererInterface { |
|
59 | 58 | /** |
60 | 59 | * {@inheritdoc} |
61 | 60 | */ |
@@ -55,16 +55,14 @@ |
||
55 | 55 | * @class FileResponse |
56 | 56 | * @package Platine\Framework\Http\Response |
57 | 57 | */ |
58 | -class FileResponse extends Response |
|
59 | -{ |
|
58 | +class FileResponse extends Response { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * Create new instance |
63 | 62 | * @param string $path |
64 | 63 | * @param string|null $filename |
65 | 64 | */ |
66 | - public function __construct(string $path, ?string $filename = null) |
|
67 | - { |
|
65 | + public function __construct(string $path, ?string $filename = null) { |
|
68 | 66 | parent::__construct(200); |
69 | 67 | |
70 | 68 | $realpath = Path::realPath($path); |
@@ -82,7 +82,7 @@ |
||
82 | 82 | |
83 | 83 | $this->headers['content-description'] = ['File Transfer']; |
84 | 84 | $this->headers['content-type'] = [$mimetype]; |
85 | - $this->headers['content-disposition'] = ['attachment; filename="' . $filename . '"']; |
|
85 | + $this->headers['content-disposition'] = ['attachment; filename="' . $filename . '"']; |
|
86 | 86 | $this->headers['expires'] = ['0']; |
87 | 87 | $this->headers['cache-control'] = ['must-revalidate']; |
88 | 88 | $this->headers['pragma'] = ['public']; |
@@ -162,14 +162,14 @@ |
||
162 | 162 | { |
163 | 163 | if ($this->isPreflight()) { |
164 | 164 | $this->setOrigin() |
165 | - ->setMaxAge() |
|
166 | - ->setAllowCredentials() |
|
167 | - ->setAllowMethods() |
|
168 | - ->setAllowHeaders(); |
|
165 | + ->setMaxAge() |
|
166 | + ->setAllowCredentials() |
|
167 | + ->setAllowMethods() |
|
168 | + ->setAllowHeaders(); |
|
169 | 169 | } else { |
170 | 170 | $this->setOrigin() |
171 | - ->setExposedHeaders() |
|
172 | - ->setAllowCredentials(); |
|
171 | + ->setExposedHeaders() |
|
172 | + ->setAllowCredentials(); |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 |
@@ -62,8 +62,7 @@ |
||
62 | 62 | * @package Platine\Framework\Http\Middleware |
63 | 63 | * @template T |
64 | 64 | */ |
65 | -class CorsMiddleware implements MiddlewareInterface |
|
66 | -{ |
|
65 | +class CorsMiddleware implements MiddlewareInterface { |
|
67 | 66 | /** |
68 | 67 | * The server request to use |
69 | 68 | * @var ServerRequestInterface |