@@ -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 |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * class Application |
61 | 61 | * @package Platine\Framework\App |
62 | 62 | */ |
63 | -class Application extends Container |
|
64 | -{ |
|
63 | +class Application extends Container { |
|
65 | 64 | |
66 | 65 | /** |
67 | 66 | * The application version |
@@ -102,8 +101,7 @@ discard block |
||
102 | 101 | * Create new instance |
103 | 102 | * @param string $basePath |
104 | 103 | */ |
105 | - public function __construct(string $basePath = '') |
|
106 | - { |
|
104 | + public function __construct(string $basePath = '') { |
|
107 | 105 | parent::__construct(); |
108 | 106 | $this->basePath = $basePath; |
109 | 107 | $this->loadCoreServiceProviders(); |
@@ -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 |
@@ -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 |
@@ -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); |
@@ -61,8 +61,7 @@ |
||
61 | 61 | * class LangServiceProvider |
62 | 62 | * @package Platine\Framework\Service\Provider |
63 | 63 | */ |
64 | -class LangServiceProvider extends ServiceProvider |
|
65 | -{ |
|
64 | +class LangServiceProvider extends ServiceProvider { |
|
66 | 65 | |
67 | 66 | /** |
68 | 67 | * {@inheritdoc} |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * class RepositoryServiceProvider |
55 | 55 | * @package Platine\Framework |
56 | 56 | */ |
57 | -class RepositoryServiceProvider extends ServiceProvider |
|
58 | -{ |
|
57 | +class RepositoryServiceProvider extends ServiceProvider { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * {@inheritdoc} |