@@ -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 | |
@@ -161,9 +161,9 @@ |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
| 164 | - * Boot the application |
|
| 165 | - * @return void |
|
| 166 | - */ |
|
| 164 | + * Boot the application |
|
| 165 | + * @return void |
|
| 166 | + */ |
|
| 167 | 167 | public function boot(): void |
| 168 | 168 | { |
| 169 | 169 | if ($this->booted) { |
@@ -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(); |
@@ -11,11 +11,9 @@ |
||
| 11 | 11 | * |
| 12 | 12 | * @author tony |
| 13 | 13 | */ |
| 14 | -class UserRepository extends Repository |
|
| 15 | -{ |
|
| 14 | +class UserRepository extends Repository { |
|
| 16 | 15 | |
| 17 | - public function __construct(EntityManager $manager) |
|
| 18 | - { |
|
| 16 | + public function __construct(EntityManager $manager) { |
|
| 19 | 17 | parent::__construct($manager, User::class); |
| 20 | 18 | } |
| 21 | 19 | } |
@@ -10,8 +10,7 @@ |
||
| 10 | 10 | * |
| 11 | 11 | * @author tony |
| 12 | 12 | */ |
| 13 | -class User extends Entity |
|
| 14 | -{ |
|
| 13 | +class User extends Entity { |
|
| 15 | 14 | |
| 16 | 15 | public static function mapEntity(EntityMapperInterface $mapper): void |
| 17 | 16 | { |
@@ -57,8 +57,7 @@ discard block |
||
| 57 | 57 | * class ConsoleKernel |
| 58 | 58 | * @package Platine\Framework\Kernel |
| 59 | 59 | */ |
| 60 | -class ConsoleKernel |
|
| 61 | -{ |
|
| 60 | +class ConsoleKernel { |
|
| 62 | 61 | |
| 63 | 62 | protected ConsoleApp $console; |
| 64 | 63 | protected Application $app; |
@@ -80,8 +79,7 @@ discard block |
||
| 80 | 79 | * @param Application $app |
| 81 | 80 | * @param ConsoleApp $console |
| 82 | 81 | */ |
| 83 | - public function __construct(Application $app, ConsoleApp $console) |
|
| 84 | - { |
|
| 82 | + public function __construct(Application $app, ConsoleApp $console) { |
|
| 85 | 83 | $this->app = $app; |
| 86 | 84 | $this->console = $console; |
| 87 | 85 | } |
@@ -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} |
@@ -84,8 +84,8 @@ |
||
| 84 | 84 | $this->template, |
| 85 | 85 | 'login', |
| 86 | 86 | [ |
| 87 | - 'name' => $name, |
|
| 88 | - 'labelName' => $this->lang->tr('name'), |
|
| 87 | + 'name' => $name, |
|
| 88 | + 'labelName' => $this->lang->tr('name'), |
|
| 89 | 89 | 'lang' => $this->lang->getLocale() |
| 90 | 90 | ] |
| 91 | 91 | ); |
@@ -20,8 +20,7 @@ |
||
| 20 | 20 | * |
| 21 | 21 | * @author tony |
| 22 | 22 | */ |
| 23 | -class LoginAction implements RequestHandlerInterface |
|
| 24 | -{ |
|
| 23 | +class LoginAction implements RequestHandlerInterface { |
|
| 25 | 24 | |
| 26 | 25 | protected LoggerInterface $logger; |
| 27 | 26 | protected Application $app; |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | * |
| 20 | 20 | * @author tony |
| 21 | 21 | */ |
| 22 | -class HomeAction implements RequestHandlerInterface |
|
| 23 | -{ |
|
| 22 | +class HomeAction implements RequestHandlerInterface { |
|
| 24 | 23 | |
| 25 | 24 | protected LoggerInterface $logger; |
| 26 | 25 | protected Application $app; |