@@ -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 | }); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function register(): void |
70 | 70 | { |
71 | - $this->app->bind(UrlGeneratorInterface::class, function (ContainerInterface $app) { |
|
71 | + $this->app->bind(UrlGeneratorInterface::class, function(ContainerInterface $app) { |
|
72 | 72 | return new ServerRequestUrlGenerator( |
73 | 73 | $app->get(ServerRequestInterface::class), |
74 | 74 | 'page' |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | $this->app->bind(RendererInterface::class, BootstrapRenderer::class); |
79 | 79 | |
80 | - $this->app->bind(Pagination::class, function (ContainerInterface $app) { |
|
80 | + $this->app->bind(Pagination::class, function(ContainerInterface $app) { |
|
81 | 81 | $pagination = new Pagination( |
82 | 82 | $app->get(UrlGeneratorInterface::class), |
83 | 83 | $app->get(RendererInterface::class) |
@@ -61,14 +61,13 @@ discard block |
||
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 | */ |
69 | 68 | public function register(): void |
70 | 69 | { |
71 | - $this->app->bind(UrlGeneratorInterface::class, function (ContainerInterface $app) { |
|
70 | + $this->app->bind(UrlGeneratorInterface::class, function (ContainerInterface $app) { |
|
72 | 71 | return new ServerRequestUrlGenerator( |
73 | 72 | $app->get(ServerRequestInterface::class), |
74 | 73 | 'page' |
@@ -77,7 +76,7 @@ discard block |
||
77 | 76 | |
78 | 77 | $this->app->bind(RendererInterface::class, BootstrapRenderer::class); |
79 | 78 | |
80 | - $this->app->bind(Pagination::class, function (ContainerInterface $app) { |
|
79 | + $this->app->bind(Pagination::class, function (ContainerInterface $app) { |
|
81 | 80 | $pagination = new Pagination( |
82 | 81 | $app->get(UrlGeneratorInterface::class), |
83 | 82 | $app->get(RendererInterface::class) |
@@ -70,7 +70,7 @@ |
||
70 | 70 | */ |
71 | 71 | public function register(): void |
72 | 72 | { |
73 | - $this->app->bind(SecurityPolicy::class, function (ContainerInterface $app) { |
|
73 | + $this->app->bind(SecurityPolicy::class, function(ContainerInterface $app) { |
|
74 | 74 | return new SecurityPolicy( |
75 | 75 | $app->get(Config::class), |
76 | 76 | $app->get(Router::class), |
@@ -63,14 +63,13 @@ |
||
63 | 63 | * @class SecurityServiceProvider |
64 | 64 | * @package Platine\Framework\Service\Provider |
65 | 65 | */ |
66 | -class SecurityServiceProvider extends ServiceProvider |
|
67 | -{ |
|
66 | +class SecurityServiceProvider extends ServiceProvider { |
|
68 | 67 | /** |
69 | 68 | * {@inheritdoc} |
70 | 69 | */ |
71 | 70 | public function register(): void |
72 | 71 | { |
73 | - $this->app->bind(SecurityPolicy::class, function (ContainerInterface $app) { |
|
72 | + $this->app->bind(SecurityPolicy::class, function (ContainerInterface $app) { |
|
74 | 73 | return new SecurityPolicy( |
75 | 74 | $app->get(Config::class), |
76 | 75 | $app->get(Router::class), |
@@ -70,7 +70,7 @@ |
||
70 | 70 | { |
71 | 71 | $config = $this->app->get(Config::class)->get('template', []); |
72 | 72 | |
73 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) use ($config) { |
|
73 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) use ($config) { |
|
74 | 74 | return new Configuration($config); |
75 | 75 | }); |
76 | 76 | $this->app->bind(AbstractCache::class, $config['cache_driver'] ?? NullCache::class); |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | * @class TemplateServiceProvider |
62 | 62 | * @package Platine\Framework\Service\Provider |
63 | 63 | */ |
64 | -class TemplateServiceProvider extends ServiceProvider |
|
65 | -{ |
|
64 | +class TemplateServiceProvider extends ServiceProvider { |
|
66 | 65 | /** |
67 | 66 | * {@inheritdoc} |
68 | 67 | */ |
@@ -70,7 +69,7 @@ discard block |
||
70 | 69 | { |
71 | 70 | $config = $this->app->get(Config::class)->get('template', []); |
72 | 71 | |
73 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) use ($config) { |
|
72 | + $this->app->bind(Configuration::class, function (ContainerInterface $app) use ($config) { |
|
74 | 73 | return new Configuration($config); |
75 | 74 | }); |
76 | 75 | $this->app->bind(AbstractCache::class, $config['cache_driver'] ?? NullCache::class); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | { |
79 | 79 | $this->app->share(Application::class, $this->app); |
80 | 80 | $this->app->share('app', $this->app); |
81 | - $this->app->share(ConsoleApp::class, function () { |
|
81 | + $this->app->share(ConsoleApp::class, function() { |
|
82 | 82 | return new ConsoleApp('PLATINE CONSOLE', '1.0.0'); |
83 | 83 | }); |
84 | 84 | $this->app->share(ContainerInterface::class, $this->app); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->app->bind(MiddlewareResolverInterface::class, MiddlewareResolver::class); |
89 | 89 | $this->app->bind(MaintenanceMiddleware::class); |
90 | 90 | $this->app->bind(MaintenanceDriverInterface::class, FileMaintenanceDriver::class); |
91 | - $this->app->bind(EmitterInterface::class, function (ContainerInterface $app) { |
|
91 | + $this->app->bind(EmitterInterface::class, function(ContainerInterface $app) { |
|
92 | 92 | return new ResponseEmitter( |
93 | 93 | $app->get(Config::class)->get('app.response_chunck_size', null) |
94 | 94 | ); |
@@ -69,8 +69,7 @@ discard block |
||
69 | 69 | * @class BaseServiceProvider |
70 | 70 | * @package Platine\Framework\Service\Provider |
71 | 71 | */ |
72 | -class BaseServiceProvider extends ServiceProvider |
|
73 | -{ |
|
72 | +class BaseServiceProvider extends ServiceProvider { |
|
74 | 73 | /** |
75 | 74 | * {@inheritdoc} |
76 | 75 | */ |
@@ -78,7 +77,7 @@ discard block |
||
78 | 77 | { |
79 | 78 | $this->app->share(Application::class, $this->app); |
80 | 79 | $this->app->share('app', $this->app); |
81 | - $this->app->share(ConsoleApp::class, function () { |
|
80 | + $this->app->share(ConsoleApp::class, function () { |
|
82 | 81 | return new ConsoleApp('PLATINE CONSOLE', '1.0.0'); |
83 | 82 | }); |
84 | 83 | $this->app->share(ContainerInterface::class, $this->app); |
@@ -88,7 +87,7 @@ discard block |
||
88 | 87 | $this->app->bind(MiddlewareResolverInterface::class, MiddlewareResolver::class); |
89 | 88 | $this->app->bind(MaintenanceMiddleware::class); |
90 | 89 | $this->app->bind(MaintenanceDriverInterface::class, FileMaintenanceDriver::class); |
91 | - $this->app->bind(EmitterInterface::class, function (ContainerInterface $app) { |
|
90 | + $this->app->bind(EmitterInterface::class, function (ContainerInterface $app) { |
|
92 | 91 | return new ResponseEmitter( |
93 | 92 | $app->get(Config::class)->get('app.response_chunck_size', null) |
94 | 93 | ); |
@@ -65,8 +65,7 @@ |
||
65 | 65 | * @class AuthServiceProvider |
66 | 66 | * @package Platine\Framework\Service\Provider |
67 | 67 | */ |
68 | -class AuthServiceProvider extends ServiceProvider |
|
69 | -{ |
|
68 | +class AuthServiceProvider extends ServiceProvider { |
|
70 | 69 | /** |
71 | 70 | * {@inheritdoc} |
72 | 71 | */ |
@@ -64,8 +64,7 @@ |
||
64 | 64 | * @class MigrationServiceProvider |
65 | 65 | * @package Platine\Framework\Service\Provider |
66 | 66 | */ |
67 | -class MigrationServiceProvider extends ServiceProvider |
|
68 | -{ |
|
67 | +class MigrationServiceProvider extends ServiceProvider { |
|
69 | 68 | /** |
70 | 69 | * {@inheritdoc} |
71 | 70 | */ |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * @class CookieServiceProvider |
57 | 57 | * @package Platine\Framework\Service\Provider |
58 | 58 | */ |
59 | -class CookieServiceProvider extends ServiceProvider |
|
60 | -{ |
|
59 | +class CookieServiceProvider extends ServiceProvider { |
|
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
63 | 62 | */ |
@@ -66,11 +66,11 @@ |
||
66 | 66 | */ |
67 | 67 | public function register(): void |
68 | 68 | { |
69 | - $this->app->bind(ErrorHandlerInterface::class, function (ContainerInterface $app) { |
|
69 | + $this->app->bind(ErrorHandlerInterface::class, function(ContainerInterface $app) { |
|
70 | 70 | return new ErrorHandler($app->get(LoggerInterface::class)); |
71 | 71 | }); |
72 | 72 | |
73 | - $this->app->bind(ErrorHandlerMiddleware::class, function (ContainerInterface $app) { |
|
73 | + $this->app->bind(ErrorHandlerMiddleware::class, function(ContainerInterface $app) { |
|
74 | 74 | return new ErrorHandlerMiddleware( |
75 | 75 | $app->get(Config::class)->get('app.debug', false), |
76 | 76 | $app->get(LoggerInterface::class) |
@@ -59,18 +59,17 @@ |
||
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 | */ |
67 | 66 | public function register(): void |
68 | 67 | { |
69 | - $this->app->bind(ErrorHandlerInterface::class, function (ContainerInterface $app) { |
|
68 | + $this->app->bind(ErrorHandlerInterface::class, function (ContainerInterface $app) { |
|
70 | 69 | return new ErrorHandler($app->get(LoggerInterface::class)); |
71 | 70 | }); |
72 | 71 | |
73 | - $this->app->bind(ErrorHandlerMiddleware::class, function (ContainerInterface $app) { |
|
72 | + $this->app->bind(ErrorHandlerMiddleware::class, function (ContainerInterface $app) { |
|
74 | 73 | return new ErrorHandlerMiddleware( |
75 | 74 | $app->get(Config::class)->get('app.debug', false), |
76 | 75 | $app->get(LoggerInterface::class) |
@@ -68,10 +68,10 @@ |
||
68 | 68 | public function register(): void |
69 | 69 | { |
70 | 70 | $cfg = $this->app->get(Config::class)->get('session', []); |
71 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) use ($cfg) { |
|
71 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) use ($cfg) { |
|
72 | 72 | return new Configuration($cfg); |
73 | 73 | }); |
74 | - $this->app->bind(SessionHandlerInterface::class, function (ContainerInterface $app) { |
|
74 | + $this->app->bind(SessionHandlerInterface::class, function(ContainerInterface $app) { |
|
75 | 75 | return new LocalStorage( |
76 | 76 | $app->get(Filesystem::class), |
77 | 77 | $app->get(Configuration::class) |
@@ -60,18 +60,17 @@ |
||
60 | 60 | * @class SessionServiceProvider |
61 | 61 | * @package Platine\Framework\Service\Provider |
62 | 62 | */ |
63 | -class SessionServiceProvider extends ServiceProvider |
|
64 | -{ |
|
63 | +class SessionServiceProvider extends ServiceProvider { |
|
65 | 64 | /** |
66 | 65 | * {@inheritdoc} |
67 | 66 | */ |
68 | 67 | public function register(): void |
69 | 68 | { |
70 | 69 | $cfg = $this->app->get(Config::class)->get('session', []); |
71 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) use ($cfg) { |
|
70 | + $this->app->bind(Configuration::class, function (ContainerInterface $app) use ($cfg) { |
|
72 | 71 | return new Configuration($cfg); |
73 | 72 | }); |
74 | - $this->app->bind(SessionHandlerInterface::class, function (ContainerInterface $app) { |
|
73 | + $this->app->bind(SessionHandlerInterface::class, function (ContainerInterface $app) { |
|
75 | 74 | return new LocalStorage( |
76 | 75 | $app->get(Filesystem::class), |
77 | 76 | $app->get(Configuration::class) |