@@ -66,8 +66,7 @@ |
||
66 | 66 | * @package Platine\Framework\Kernel |
67 | 67 | * @template T |
68 | 68 | */ |
69 | -class HttpKernel extends BaseKernel implements RequestHandlerInterface |
|
70 | -{ |
|
69 | +class HttpKernel extends BaseKernel implements RequestHandlerInterface { |
|
71 | 70 | /** |
72 | 71 | * The router instance |
73 | 72 | * @var Router |
@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | * @class BaseKernel |
54 | 54 | * @package Platine\Framework\Kernel |
55 | 55 | */ |
56 | -class BaseKernel |
|
57 | -{ |
|
56 | +class BaseKernel { |
|
58 | 57 | /** |
59 | 58 | * Application instance |
60 | 59 | * @var Application |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * Create new instance |
66 | 65 | * @param Application $app |
67 | 66 | */ |
68 | - public function __construct(Application $app) |
|
69 | - { |
|
67 | + public function __construct(Application $app) { |
|
70 | 68 | $this->app = $app; |
71 | 69 | } |
72 | 70 |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * @package Platine\Framework\Kernel |
59 | 59 | * @template T |
60 | 60 | */ |
61 | -class ConsoleKernel extends BaseKernel |
|
62 | -{ |
|
61 | +class ConsoleKernel extends BaseKernel { |
|
63 | 62 | protected ConsoleApp $console; |
64 | 63 | |
65 | 64 | /** |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | * @param Application $app |
80 | 79 | * @param ConsoleApp $console |
81 | 80 | */ |
82 | - public function __construct(Application $app, ConsoleApp $console) |
|
83 | - { |
|
81 | + public function __construct(Application $app, ConsoleApp $console) { |
|
84 | 82 | parent::__construct($app); |
85 | 83 | $this->console = $console; |
86 | 84 | } |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @package Platine\Framework\Console\Command |
62 | 62 | * @template T |
63 | 63 | */ |
64 | -class VendorPublishCommand extends Command |
|
65 | -{ |
|
64 | +class VendorPublishCommand extends Command { |
|
66 | 65 | /** |
67 | 66 | * Application instance |
68 | 67 | * @var Application |
@@ -130,8 +129,7 @@ discard block |
||
130 | 129 | /** |
131 | 130 | * {@inheritodc} |
132 | 131 | */ |
133 | - public function execute() |
|
134 | - { |
|
132 | + public function execute() { |
|
135 | 133 | $writer = $this->io()->writer(); |
136 | 134 | $name = $this->getArgumentValue('name'); |
137 | 135 | $writer->boldGreen(sprintf('PUBLISH OF PACKAGE [%s]', $name), true)->eol(); |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | * @package Platine\Framework\Console\Command |
57 | 57 | * @template T |
58 | 58 | */ |
59 | -class ConfigCommand extends Command |
|
60 | -{ |
|
59 | +class ConfigCommand extends Command { |
|
61 | 60 | /** |
62 | 61 | * The configuration instance |
63 | 62 | * @var Config<T> |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | * Create new instance |
69 | 68 | * @param Config<T> $config |
70 | 69 | */ |
71 | - public function __construct(Config $config) |
|
72 | - { |
|
70 | + public function __construct(Config $config) { |
|
73 | 71 | parent::__construct('config', 'Command to manage configuration'); |
74 | 72 | |
75 | 73 | $this->addOption('-l|--list', 'List the configuration', '', false); |
@@ -81,8 +79,7 @@ discard block |
||
81 | 79 | /** |
82 | 80 | * {@inheritodc} |
83 | 81 | */ |
84 | - public function execute() |
|
85 | - { |
|
82 | + public function execute() { |
|
86 | 83 | if ($this->getOptionValue('list')) { |
87 | 84 | $this->showConfigList(); |
88 | 85 | } |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | * @class MakeActionCommand |
56 | 56 | * @package Platine\Framework\Console\Command |
57 | 57 | */ |
58 | -class MakeActionCommand extends MakeCommand |
|
59 | -{ |
|
58 | +class MakeActionCommand extends MakeCommand { |
|
60 | 59 | /** |
61 | 60 | * {@inheritodc} |
62 | 61 | */ |
@@ -84,31 +83,3 @@ discard block |
||
84 | 83 | public function getClassTemplate(): string |
85 | 84 | { |
86 | 85 | return <<<EOF |
87 | - <?php |
|
88 | - |
|
89 | - declare(strict_types=1); |
|
90 | - |
|
91 | - namespace %namespace%; |
|
92 | - |
|
93 | - use Platine\Http\Handler\RequestHandlerInterface; |
|
94 | - use Platine\Http\ResponseInterface; |
|
95 | - use Platine\Http\ServerRequestInterface; |
|
96 | - |
|
97 | - /** |
|
98 | - * @class %classname% |
|
99 | - * @package %namespace% |
|
100 | - */ |
|
101 | - class %classname% implements RequestHandlerInterface |
|
102 | - { |
|
103 | - |
|
104 | - /** |
|
105 | - * {@inheritodc} |
|
106 | - */ |
|
107 | - public function handle(ServerRequestInterface \$request): ResponseInterface |
|
108 | - { |
|
109 | - } |
|
110 | - } |
|
111 | - |
|
112 | - EOF; |
|
113 | - } |
|
114 | -} |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @class MakeCommand |
58 | 58 | * @package Platine\Framework\Console |
59 | 59 | */ |
60 | -abstract class MakeCommand extends Command |
|
61 | -{ |
|
60 | +abstract class MakeCommand extends Command { |
|
62 | 61 | /** |
63 | 62 | * The Application instance |
64 | 63 | * @var Application |
@@ -110,8 +109,7 @@ discard block |
||
110 | 109 | /** |
111 | 110 | * {@inheritodc} |
112 | 111 | */ |
113 | - public function execute() |
|
114 | - { |
|
112 | + public function execute() { |
|
115 | 113 | $writer = $this->io()->writer(); |
116 | 114 | $name = $this->getArgumentValue('name'); |
117 | 115 | $cleanName = str_replace('/', '\\', $name); |
@@ -52,8 +52,7 @@ |
||
52 | 52 | * @class Env |
53 | 53 | * @package Platine\Framework\Env |
54 | 54 | */ |
55 | -class Env |
|
56 | -{ |
|
55 | +class Env { |
|
57 | 56 | /** |
58 | 57 | * Get the environment variable by its key/name. |
59 | 58 | * @param string $key |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class ServerRequestUrlGenerator |
55 | 55 | * @package Platine\Framework\Pagination |
56 | 56 | */ |
57 | -class ServerRequestUrlGenerator implements UrlGeneratorInterface |
|
58 | -{ |
|
57 | +class ServerRequestUrlGenerator implements UrlGeneratorInterface { |
|
59 | 58 | /** |
60 | 59 | * The server request instance |
61 | 60 | * @var ServerRequestInterface |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | * @param ServerRequestInterface $request |
80 | 79 | * @param string $queryName |
81 | 80 | */ |
82 | - public function __construct(ServerRequestInterface $request, string $queryName) |
|
83 | - { |
|
81 | + public function __construct(ServerRequestInterface $request, string $queryName) { |
|
84 | 82 | $this->request = $request; |
85 | 83 | $this->queryVarName = $queryName; |
86 | 84 |