@@ -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'), |
| 77 | 77 | $app->get(LoggerInterface::class) |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | ServerRequestInterface $request, |
| 149 | 149 | RequestHandlerInterface $handler |
| 150 | 150 | ): ResponseInterface { |
| 151 | - set_error_handler(static function ( |
|
| 151 | + set_error_handler(static function( |
|
| 152 | 152 | int $severity, |
| 153 | 153 | string $message, |
| 154 | 154 | string $file, |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function register(): void |
| 71 | 71 | { |
| 72 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) { |
|
| 72 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) { |
|
| 73 | 73 | return new Configuration($app->get(Config::class)->get('template', [])); |
| 74 | 74 | }); |
| 75 | 75 | $this->app->bind(AbstractCache::class, NullCache::class); |
@@ -69,17 +69,17 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function register(): void |
| 71 | 71 | { |
| 72 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) { |
|
| 72 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) { |
|
| 73 | 73 | /** @template T @var Config<T> $config */ |
| 74 | 74 | $config = $app->get(Config::class); |
| 75 | 75 | $driver = $config->get('database.default', 'default'); |
| 76 | 76 | |
| 77 | 77 | return new Configuration($config->get('database.connections.' . $driver, [])); |
| 78 | 78 | }); |
| 79 | - $this->app->bind(Pool::class, function (ContainerInterface $app) { |
|
| 79 | + $this->app->bind(Pool::class, function(ContainerInterface $app) { |
|
| 80 | 80 | return new Pool($app->get(Config::class)->get('database', [])); |
| 81 | 81 | }); |
| 82 | - $this->app->share(Connection::class, function (ContainerInterface $app) { |
|
| 82 | + $this->app->share(Connection::class, function(ContainerInterface $app) { |
|
| 83 | 83 | return new Connection( |
| 84 | 84 | $app->get(Configuration::class), |
| 85 | 85 | $app->get(LoggerInterface::class) |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | public function register(): void |
| 72 | 72 | { |
| 73 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) { |
|
| 73 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) { |
|
| 74 | 74 | return new Configuration($app->get(Config::class)->get('cache', [])); |
| 75 | 75 | }); |
| 76 | 76 | $this->app->bind(AdapterInterface::class, LocalAdapter::class); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | $kernel = $app->make(HttpKernel::class); |
| 12 | 12 | |
| 13 | -$kernel->use(function($req, $h){ |
|
| 13 | +$kernel->use(function($req, $h) { |
|
| 14 | 14 | return $h->handle($req); |
| 15 | 15 | }); |
| 16 | 16 | |
@@ -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.6.8'); |
| 81 | 81 | }); |
| 82 | 82 | $this->app->share(ContainerInterface::class, $this->app); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->app->bind(RouteCollectionInterface::class, RouteCollection::class); |
| 85 | 85 | $this->app->share(Router::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 | ); |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function register(): void |
| 71 | 71 | { |
| 72 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) { |
|
| 72 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) { |
|
| 73 | 73 | return new Configuration($app->get(Config::class)->get('lang', [])); |
| 74 | 74 | }); |
| 75 | 75 | $this->app->bind(StorageInterface::class, MemoryStorage::class); |
@@ -71,11 +71,11 @@ |
||
| 71 | 71 | public function register(): void |
| 72 | 72 | { |
| 73 | 73 | $cfg = $this->app->get(Config::class)->get('session', []); |
| 74 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) use ($cfg) { |
|
| 74 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) use ($cfg) { |
|
| 75 | 75 | return new Configuration($cfg); |
| 76 | 76 | }); |
| 77 | 77 | $this->app->bind(Filesystem::class); |
| 78 | - $this->app->bind(SessionHandlerInterface::class, function (ContainerInterface $app) { |
|
| 78 | + $this->app->bind(SessionHandlerInterface::class, function(ContainerInterface $app) { |
|
| 79 | 79 | return new LocalStorage( |
| 80 | 80 | $app->get(Filesystem::class), |
| 81 | 81 | $app->get(Configuration::class) |