@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * class MyServiceProvider |
| 54 | 54 | * @package Platine\Framework |
| 55 | 55 | */ |
| 56 | -class MyServiceProvider extends ServiceProvider |
|
| 57 | -{ |
|
| 56 | +class MyServiceProvider extends ServiceProvider { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * {@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); |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * class BaseKernel |
| 54 | 54 | * @package Platine\Framework\Kernel |
| 55 | 55 | */ |
| 56 | -class BaseKernel |
|
| 57 | -{ |
|
| 56 | +class BaseKernel { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * 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 | |
@@ -63,8 +63,7 @@ discard block |
||
| 63 | 63 | * class HttpKernel |
| 64 | 64 | * @package Platine\Framework\Kernel |
| 65 | 65 | */ |
| 66 | -class HttpKernel extends BaseKernel implements RequestHandlerInterface |
|
| 67 | -{ |
|
| 66 | +class HttpKernel extends BaseKernel implements RequestHandlerInterface { |
|
| 68 | 67 | |
| 69 | 68 | /** |
| 70 | 69 | * The router instance |
@@ -83,8 +82,7 @@ discard block |
||
| 83 | 82 | * @param Application $app |
| 84 | 83 | * @param Router $router |
| 85 | 84 | */ |
| 86 | - public function __construct(Application $app, Router $router) |
|
| 87 | - { |
|
| 85 | + public function __construct(Application $app, Router $router) { |
|
| 88 | 86 | parent::__construct($app); |
| 89 | 87 | $this->router = $router; |
| 90 | 88 | } |
@@ -57,8 +57,7 @@ discard block |
||
| 57 | 57 | * class ConsoleKernel |
| 58 | 58 | * @package Platine\Framework\Kernel |
| 59 | 59 | */ |
| 60 | -class ConsoleKernel extends BaseKernel |
|
| 61 | -{ |
|
| 60 | +class ConsoleKernel extends BaseKernel { |
|
| 62 | 61 | |
| 63 | 62 | protected ConsoleApp $console; |
| 64 | 63 | |
@@ -79,8 +78,7 @@ discard block |
||
| 79 | 78 | * @param Application $app |
| 80 | 79 | * @param ConsoleApp $console |
| 81 | 80 | */ |
| 82 | - public function __construct(Application $app, ConsoleApp $console) |
|
| 83 | - { |
|
| 81 | + public function __construct(Application $app, ConsoleApp $console) { |
|
| 84 | 82 | parent::__construct($app); |
| 85 | 83 | $this->console = $console; |
| 86 | 84 | } |
@@ -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) |
@@ -103,9 +103,9 @@ |
||
| 103 | 103 | $this->template, |
| 104 | 104 | 'login', |
| 105 | 105 | [ |
| 106 | - 'name' => $name, |
|
| 107 | - 'labelName' => $this->lang->tr('name'), |
|
| 108 | - 'lang' => $this->lang->getLocale() |
|
| 106 | + 'name' => $name, |
|
| 107 | + 'labelName' => $this->lang->tr('name'), |
|
| 108 | + 'lang' => $this->lang->getLocale() |
|
| 109 | 109 | ] |
| 110 | 110 | ); |
| 111 | 111 | } |
@@ -2,8 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Platine\Framework\Demo\Form\Param; |
| 4 | 4 | |
| 5 | -class AuthParam extends BaseParam |
|
| 6 | -{ |
|
| 5 | +class AuthParam extends BaseParam { |
|
| 7 | 6 | protected string $username; |
| 8 | 7 | |
| 9 | 8 | public function getUsername(): string |
@@ -10,15 +10,13 @@ |
||
| 10 | 10 | |
| 11 | 11 | use Platine\Stdlib\Helper\Str; |
| 12 | 12 | |
| 13 | -class BaseParam |
|
| 14 | -{ |
|
| 13 | +class BaseParam { |
|
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * Create new instance |
| 18 | 17 | * @param array<string, mixed> $data |
| 19 | 18 | */ |
| 20 | - public function __construct(array $data = []) |
|
| 21 | - { |
|
| 19 | + public function __construct(array $data = []) { |
|
| 22 | 20 | $params = array_merge($this->getDefault(), $data); |
| 23 | 21 | $this->load($params); |
| 24 | 22 | } |