@@ -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; |
@@ -65,8 +65,7 @@ discard block |
||
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 |
||
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 |
||
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; |
@@ -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 | } |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | * @class User |
57 | 57 | * @package Platine\Framework\Auth\Entity |
58 | 58 | */ |
59 | -class User extends Entity implements IdentityInterface |
|
60 | -{ |
|
59 | +class User extends Entity implements IdentityInterface { |
|
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
63 | 62 | */ |
@@ -106,8 +105,7 @@ discard block |
||
106 | 105 | /** |
107 | 106 | * {@inheritdoc} |
108 | 107 | */ |
109 | - public function getId() |
|
110 | - { |
|
108 | + public function getId() { |
|
111 | 109 | return $this->mapper()->getColumn('id'); |
112 | 110 | } |
113 | 111 |
@@ -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 | */ |
@@ -54,14 +54,12 @@ |
||
54 | 54 | * @class AbstractValidator |
55 | 55 | * @package Platine\Framework\Form\Validator |
56 | 56 | */ |
57 | -abstract class AbstractValidator extends Validator |
|
58 | -{ |
|
57 | +abstract class AbstractValidator extends Validator { |
|
59 | 58 | /** |
60 | 59 | * Create new instance |
61 | 60 | * @param Lang $lang |
62 | 61 | */ |
63 | - public function __construct(Lang $lang) |
|
64 | - { |
|
62 | + public function __construct(Lang $lang) { |
|
65 | 63 | parent::__construct($lang); |
66 | 64 | } |
67 | 65 |
@@ -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']; |