@@ -37,8 +37,7 @@ |
||
37 | 37 | * HttpNotFoundException |
38 | 38 | * @package Platine\Framework\Http\Exception |
39 | 39 | */ |
40 | -class HttpNotFoundException extends HttpSpecialException |
|
41 | -{ |
|
40 | +class HttpNotFoundException extends HttpSpecialException { |
|
42 | 41 | /** |
43 | 42 | * |
44 | 43 | * @var int |
@@ -37,8 +37,7 @@ |
||
37 | 37 | * HttpMethodNotAllowedException |
38 | 38 | * @package Platine\Framework\Http\Exception |
39 | 39 | */ |
40 | -class HttpMethodNotAllowedException extends HttpSpecialException |
|
41 | -{ |
|
40 | +class HttpMethodNotAllowedException extends HttpSpecialException { |
|
42 | 41 | /** |
43 | 42 | * |
44 | 43 | * @var int |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * class RouteDispatcherMiddleware |
60 | 60 | * @package Platine\Framework\Http\Middleware |
61 | 61 | */ |
62 | -class RouteDispatcherMiddleware implements MiddlewareInterface |
|
63 | -{ |
|
62 | +class RouteDispatcherMiddleware implements MiddlewareInterface { |
|
64 | 63 | |
65 | 64 | /** |
66 | 65 | * The Middleware resolver instance |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | * Create new instance |
73 | 72 | * @param MiddlewareResolverInterface $resolver |
74 | 73 | */ |
75 | - public function __construct(MiddlewareResolverInterface $resolver) |
|
76 | - { |
|
74 | + public function __construct(MiddlewareResolverInterface $resolver) { |
|
77 | 75 | $this->resolver = $resolver; |
78 | 76 | } |
79 | 77 |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * class SessionMiddleware |
59 | 59 | * @package Platine\Framework\Http\Middleware |
60 | 60 | */ |
61 | -class SessionMiddleware implements MiddlewareInterface |
|
62 | -{ |
|
61 | +class SessionMiddleware implements MiddlewareInterface { |
|
63 | 62 | |
64 | 63 | /** |
65 | 64 | * The application instance |
@@ -71,8 +70,7 @@ discard block |
||
71 | 70 | * Create new instance |
72 | 71 | * @param Application $app |
73 | 72 | */ |
74 | - public function __construct(Application $app) |
|
75 | - { |
|
73 | + public function __construct(Application $app) { |
|
76 | 74 | $this->app = $app; |
77 | 75 | } |
78 | 76 |
@@ -58,8 +58,7 @@ |
||
58 | 58 | * class SessionServiceProvider |
59 | 59 | * @package Platine\Framework\Service\Provider |
60 | 60 | */ |
61 | -class SessionServiceProvider extends ServiceProvider |
|
62 | -{ |
|
61 | +class SessionServiceProvider extends ServiceProvider { |
|
63 | 62 | |
64 | 63 | /** |
65 | 64 | * {@inheritdoc} |
@@ -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) |
@@ -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); |
@@ -61,8 +61,7 @@ |
||
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 | /** |
68 | 67 | * {@inheritdoc} |
@@ -59,8 +59,7 @@ |
||
59 | 59 | * class CacheServiceProvider |
60 | 60 | * @package Platine\Framework\Service\Provider |
61 | 61 | */ |
62 | -class CacheServiceProvider extends ServiceProvider |
|
63 | -{ |
|
62 | +class CacheServiceProvider extends ServiceProvider { |
|
64 | 63 | |
65 | 64 | /** |
66 | 65 | * {@inheritdoc} |
@@ -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); |
@@ -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 | /** |
63 | 62 | * {@inheritdoc} |
@@ -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) |
@@ -61,8 +61,7 @@ |
||
61 | 61 | * class DatabaseServiceProvider |
62 | 62 | * @package Platine\Framework\Service\Provider |
63 | 63 | */ |
64 | -class DatabaseServiceProvider extends ServiceProvider |
|
65 | -{ |
|
64 | +class DatabaseServiceProvider extends ServiceProvider { |
|
66 | 65 | |
67 | 66 | /** |
68 | 67 | * {@inheritdoc} |