@@ -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 @@ |
||
| 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} |
@@ -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} |
@@ -70,17 +70,17 @@ |
||
| 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 | /** @template T @var Config<T> $config */ |
| 75 | 75 | $config = $app->get(Config::class); |
| 76 | 76 | $driver = $config->get('database.default', 'default'); |
| 77 | 77 | |
| 78 | 78 | return new Configuration($config->get('database.connections.' . $driver, [])); |
| 79 | 79 | }); |
| 80 | - $this->app->share(Pool::class, function (ContainerInterface $app) { |
|
| 80 | + $this->app->share(Pool::class, function(ContainerInterface $app) { |
|
| 81 | 81 | return new Pool($app->get(Config::class)->get('database', [])); |
| 82 | 82 | }); |
| 83 | - $this->app->share(Connection::class, function (ContainerInterface $app) { |
|
| 83 | + $this->app->share(Connection::class, function(ContainerInterface $app) { |
|
| 84 | 84 | return new Connection( |
| 85 | 85 | $app->get(Configuration::class), |
| 86 | 86 | $app->get(LoggerInterface::class) |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * class ServiceProvider |
| 54 | 54 | * @package Platine\Framework\Service |
| 55 | 55 | */ |
| 56 | -class ServiceProvider |
|
| 57 | -{ |
|
| 56 | +class ServiceProvider { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * The Application instance |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | * Create new instance |
| 67 | 66 | * @param Application $app |
| 68 | 67 | */ |
| 69 | - public function __construct(Application $app) |
|
| 70 | - { |
|
| 68 | + public function __construct(Application $app) { |
|
| 71 | 69 | $this->app = $app; |
| 72 | 70 | } |
| 73 | 71 | |