@@ -53,15 +53,13 @@ |
||
53 | 53 | * @class RedirectResponse |
54 | 54 | * @package Platine\Framework\Http\Response |
55 | 55 | */ |
56 | -class RedirectResponse extends Response |
|
57 | -{ |
|
56 | +class RedirectResponse extends Response { |
|
58 | 57 | |
59 | 58 | /** |
60 | 59 | * Create new instance |
61 | 60 | * @param string $url |
62 | 61 | */ |
63 | - public function __construct(string $url = '/') |
|
64 | - { |
|
62 | + public function __construct(string $url = '/') { |
|
65 | 63 | parent::__construct(302); |
66 | 64 | $this->headers['location'] = [$url]; |
67 | 65 | } |
@@ -67,11 +67,11 @@ |
||
67 | 67 | */ |
68 | 68 | public function register(): void |
69 | 69 | { |
70 | - $this->app->bind(ErrorHandlerInterface::class, function (ContainerInterface $app) { |
|
70 | + $this->app->bind(ErrorHandlerInterface::class, function(ContainerInterface $app) { |
|
71 | 71 | return new ErrorHandler($app->get(LoggerInterface::class)); |
72 | 72 | }); |
73 | 73 | |
74 | - $this->app->bind(ErrorHandlerMiddleware::class, function (ContainerInterface $app) { |
|
74 | + $this->app->bind(ErrorHandlerMiddleware::class, function(ContainerInterface $app) { |
|
75 | 75 | return new ErrorHandlerMiddleware( |
76 | 76 | $app->get(Config::class)->get('app.debug', false), |
77 | 77 | $app->get(LoggerInterface::class) |
@@ -59,8 +59,7 @@ |
||
59 | 59 | * @class ErrorHandlerServiceProvider |
60 | 60 | * @package Platine\Framework\Service\Provider |
61 | 61 | */ |
62 | -class ErrorHandlerServiceProvider extends ServiceProvider |
|
63 | -{ |
|
62 | +class ErrorHandlerServiceProvider extends ServiceProvider { |
|
64 | 63 | /** |
65 | 64 | * {@inheritdoc} |
66 | 65 | */ |
@@ -168,7 +168,7 @@ |
||
168 | 168 | continue; |
169 | 169 | } |
170 | 170 | |
171 | - $value = preg_replace_callback('~\$\{(\w+)\}~', function ($m) { |
|
171 | + $value = preg_replace_callback('~\$\{(\w+)\}~', function($m) { |
|
172 | 172 | return (null === $ref = Env::get($m[1], null)) ? $m[0] : $ref; |
173 | 173 | }, $value); |
174 | 174 |
@@ -55,8 +55,7 @@ |
||
55 | 55 | * @class Loader |
56 | 56 | * @package Platine\Framework\Env |
57 | 57 | */ |
58 | -class Loader |
|
59 | -{ |
|
58 | +class Loader { |
|
60 | 59 | /** |
61 | 60 | * Put the parsed key value pair into |
62 | 61 | * $_ENV super global. |
@@ -116,12 +116,12 @@ |
||
116 | 116 | $options = 0 |
117 | 117 | ) { |
118 | 118 | static $special = [ |
119 | - 'true' => true, |
|
120 | - 'TRUE' => true, |
|
121 | - 'false' => false, |
|
122 | - 'FALSE' => false, |
|
123 | - 'null' => null, |
|
124 | - 'NULL' => null, |
|
119 | + 'true' => true, |
|
120 | + 'TRUE' => true, |
|
121 | + 'false' => false, |
|
122 | + 'FALSE' => false, |
|
123 | + 'null' => null, |
|
124 | + 'NULL' => null, |
|
125 | 125 | ]; |
126 | 126 | |
127 | 127 | $valueResolved = static::resolveReference($value); |
@@ -149,7 +149,7 @@ |
||
149 | 149 | return $value; |
150 | 150 | } |
151 | 151 | |
152 | - $valueResolved = preg_replace_callback('~\$\{(\w+)\}~', function ($m) { |
|
152 | + $valueResolved = preg_replace_callback('~\$\{(\w+)\}~', function($m) { |
|
153 | 153 | return (null === $ref = static::get($m[1], null)) ? $m[0] : $ref; |
154 | 154 | }, $value); |
155 | 155 |
@@ -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 |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * @class AbstractSeed |
54 | 54 | * @package Platine\Framework\Migration\Seed |
55 | 55 | */ |
56 | -abstract class AbstractSeed extends QueryBuilder |
|
57 | -{ |
|
56 | +abstract class AbstractSeed extends QueryBuilder { |
|
58 | 57 | /** |
59 | 58 | * Run the seed |
60 | 59 | * @return void |
@@ -71,7 +71,7 @@ |
||
71 | 71 | ) { |
72 | 72 | parent::__construct($app, $config, $filesystem); |
73 | 73 | $this->setName('seed:status') |
74 | - ->setDescription('Show your database seeds status'); |
|
74 | + ->setDescription('Show your database seeds status'); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @template T |
58 | 58 | * @extends AbstractSeedCommand<T> |
59 | 59 | */ |
60 | -class SeedStatusCommand extends AbstractSeedCommand |
|
61 | -{ |
|
60 | +class SeedStatusCommand extends AbstractSeedCommand { |
|
62 | 61 | /** |
63 | 62 | * Create new instance |
64 | 63 | * {@inheritdoc} |
@@ -76,8 +75,7 @@ discard block |
||
76 | 75 | /** |
77 | 76 | * {@inheritdoc} |
78 | 77 | */ |
79 | - public function execute() |
|
80 | - { |
|
78 | + public function execute() { |
|
81 | 79 | $writer = $this->io()->writer(); |
82 | 80 | $writer->boldYellow('SEED STATUS', true)->eol(); |
83 | 81 | $writer->bold('Seed path: '); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | ) { |
72 | 72 | parent::__construct($app, $config, $filesystem); |
73 | 73 | $this->setName('seed:exec') |
74 | - ->setDescription('Command to execute seed'); |
|
74 | + ->setDescription('Command to execute seed'); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @template T |
58 | 58 | * @extends AbstractSeedCommand<T> |
59 | 59 | */ |
60 | -class SeedExecuteCommand extends AbstractSeedCommand |
|
61 | -{ |
|
60 | +class SeedExecuteCommand extends AbstractSeedCommand { |
|
62 | 61 | /** |
63 | 62 | * Create new instance |
64 | 63 | * {@inheritdoc} |
@@ -76,8 +75,7 @@ discard block |
||
76 | 75 | /** |
77 | 76 | * {@inheritdoc} |
78 | 77 | */ |
79 | - public function execute() |
|
80 | - { |
|
78 | + public function execute() { |
|
81 | 79 | $io = $this->io(); |
82 | 80 | $writer = $io->writer(); |
83 | 81 | $writer->boldYellow('SEED EXECUTION', true)->eol(); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | { |
77 | 77 | $this->app->share(Application::class, $this->app); |
78 | 78 | $this->app->share('app', $this->app); |
79 | - $this->app->share(ConsoleApp::class, function () { |
|
79 | + $this->app->share(ConsoleApp::class, function() { |
|
80 | 80 | return new ConsoleApp('PLATINE CONSOLE', '1.0.0'); |
81 | 81 | }); |
82 | 82 | $this->app->share(ContainerInterface::class, $this->app); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $this->app->share(Router::class); |
85 | 85 | $this->app->bind(RouteCollectionInterface::class, RouteCollection::class); |
86 | 86 | $this->app->bind(MiddlewareResolverInterface::class, MiddlewareResolver::class); |
87 | - $this->app->bind(EmitterInterface::class, function (ContainerInterface $app) { |
|
87 | + $this->app->bind(EmitterInterface::class, function(ContainerInterface $app) { |
|
88 | 88 | return new ResponseEmitter( |
89 | 89 | $app->get(Config::class)->get('app.response_chunck_size', null) |
90 | 90 | ); |
@@ -66,8 +66,7 @@ |
||
66 | 66 | * @class BaseServiceProvider |
67 | 67 | * @package Platine\Framework\Service\Provider |
68 | 68 | */ |
69 | -class BaseServiceProvider extends ServiceProvider |
|
70 | -{ |
|
69 | +class BaseServiceProvider extends ServiceProvider { |
|
71 | 70 | /** |
72 | 71 | * {@inheritdoc} |
73 | 72 | */ |
@@ -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 |