@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class UserParam |
| 55 | 55 | * @package Platine\Framework\Demo\Form\Param |
| 56 | 56 | */ |
| 57 | -class UserParam extends BaseParam |
|
| 58 | -{ |
|
| 57 | +class UserParam extends BaseParam { |
|
| 59 | 58 | /** |
| 60 | 59 | * The username |
| 61 | 60 | * @var string |
@@ -100,37 +100,37 @@ |
||
| 100 | 100 | public function setRules(): void |
| 101 | 101 | { |
| 102 | 102 | $this->validator->addRules('username', [ |
| 103 | - new NotEmpty(), |
|
| 104 | - new MinLength(3), |
|
| 105 | - new AlphaDash() |
|
| 103 | + new NotEmpty(), |
|
| 104 | + new MinLength(3), |
|
| 105 | + new AlphaDash() |
|
| 106 | 106 | ]); |
| 107 | 107 | |
| 108 | 108 | $this->validator->addRules('lastname', [ |
| 109 | - new NotEmpty(), |
|
| 110 | - new MinLength(3) |
|
| 109 | + new NotEmpty(), |
|
| 110 | + new MinLength(3) |
|
| 111 | 111 | ]); |
| 112 | 112 | |
| 113 | 113 | $this->validator->addRules('firstname', [ |
| 114 | - new NotEmpty(), |
|
| 115 | - new MinLength(3) |
|
| 114 | + new NotEmpty(), |
|
| 115 | + new MinLength(3) |
|
| 116 | 116 | ]); |
| 117 | 117 | |
| 118 | 118 | $this->validator->addRules('status', [ |
| 119 | - new NotEmpty(), |
|
| 120 | - new InList([0, 1]) |
|
| 119 | + new NotEmpty(), |
|
| 120 | + new InList([0, 1]) |
|
| 121 | 121 | ]); |
| 122 | 122 | |
| 123 | 123 | $this->validator->addRules('email', [ |
| 124 | - new NotEmpty(), |
|
| 125 | - new Email() |
|
| 124 | + new NotEmpty(), |
|
| 125 | + new Email() |
|
| 126 | 126 | ]); |
| 127 | 127 | |
| 128 | 128 | $this->validator->addRules('role', [ |
| 129 | - new MinLength(3) |
|
| 129 | + new MinLength(3) |
|
| 130 | 130 | ]); |
| 131 | 131 | |
| 132 | 132 | $this->validator->addRules('password', [ |
| 133 | - new MinLength(5), |
|
| 133 | + new MinLength(5), |
|
| 134 | 134 | ]); |
| 135 | 135 | } |
| 136 | 136 | } |
@@ -60,8 +60,7 @@ discard block |
||
| 60 | 60 | * @class UserValidator |
| 61 | 61 | * @package Platine\Framework\Demo\Form\Validator |
| 62 | 62 | */ |
| 63 | -class UserValidator extends AbstractValidator |
|
| 64 | -{ |
|
| 63 | +class UserValidator extends AbstractValidator { |
|
| 65 | 64 | |
| 66 | 65 | /** |
| 67 | 66 | * The user parameter instance |
@@ -74,8 +73,7 @@ discard block |
||
| 74 | 73 | * @param UserParam $param |
| 75 | 74 | * @param Validator|null $validator |
| 76 | 75 | */ |
| 77 | - public function __construct(UserParam $param, ?Validator $validator = null) |
|
| 78 | - { |
|
| 76 | + public function __construct(UserParam $param, ?Validator $validator = null) { |
|
| 79 | 77 | parent::__construct($validator); |
| 80 | 78 | $this->param = $param; |
| 81 | 79 | } |
@@ -57,8 +57,7 @@ discard block |
||
| 57 | 57 | * @class AuthValidator |
| 58 | 58 | * @package Platine\Framework\Demo\Form\Validator |
| 59 | 59 | */ |
| 60 | -class AuthValidator extends AbstractValidator |
|
| 61 | -{ |
|
| 60 | +class AuthValidator extends AbstractValidator { |
|
| 62 | 61 | /** |
| 63 | 62 | * The authentication parameter instance |
| 64 | 63 | * @var AuthParam |
@@ -70,8 +69,7 @@ discard block |
||
| 70 | 69 | * @param AuthParam $param |
| 71 | 70 | * @param Validator|null $validator |
| 72 | 71 | */ |
| 73 | - public function __construct(AuthParam $param, ?Validator $validator = null) |
|
| 74 | - { |
|
| 72 | + public function __construct(AuthParam $param, ?Validator $validator = null) { |
|
| 75 | 73 | parent::__construct($validator); |
| 76 | 74 | $this->param = $param; |
| 77 | 75 | } |
@@ -56,8 +56,7 @@ discard block |
||
| 56 | 56 | * @package Platine\Framework\Console\Command |
| 57 | 57 | * @template T |
| 58 | 58 | */ |
| 59 | -class ConfigCommand extends Command |
|
| 60 | -{ |
|
| 59 | +class ConfigCommand extends Command { |
|
| 61 | 60 | |
| 62 | 61 | /** |
| 63 | 62 | * The configuration instance |
@@ -69,8 +68,7 @@ discard block |
||
| 69 | 68 | * Create new instance |
| 70 | 69 | * @param Config<T> $config |
| 71 | 70 | */ |
| 72 | - public function __construct(Config $config) |
|
| 73 | - { |
|
| 71 | + public function __construct(Config $config) { |
|
| 74 | 72 | parent::__construct('config', 'Command to manage configuration'); |
| 75 | 73 | |
| 76 | 74 | $this->addOption('-l|--list', 'List the configuration', '', false); |
@@ -82,8 +80,7 @@ discard block |
||
| 82 | 80 | /** |
| 83 | 81 | * {@inheritodc} |
| 84 | 82 | */ |
| 85 | - public function execute() |
|
| 86 | - { |
|
| 83 | + public function execute() { |
|
| 87 | 84 | if ($this->getOptionValue('list')) { |
| 88 | 85 | $this->showConfigList(); |
| 89 | 86 | } |
@@ -60,8 +60,7 @@ discard block |
||
| 60 | 60 | * @package Platine\Framework\Console\Command |
| 61 | 61 | * @template T |
| 62 | 62 | */ |
| 63 | -class VendorPublishCommand extends Command |
|
| 64 | -{ |
|
| 63 | +class VendorPublishCommand extends Command { |
|
| 65 | 64 | |
| 66 | 65 | /** |
| 67 | 66 | * Application instance |
@@ -128,8 +127,7 @@ discard block |
||
| 128 | 127 | /** |
| 129 | 128 | * {@inheritodc} |
| 130 | 129 | */ |
| 131 | - public function execute() |
|
| 132 | - { |
|
| 130 | + public function execute() { |
|
| 133 | 131 | $writer = $this->io()->writer(); |
| 134 | 132 | $name = $this->getArgumentValue('name'); |
| 135 | 133 | $writer->boldGreen(sprintf('PUBLISH OF PACKAGE [%s]', $name), true)->eol(); |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | * @package Platine\Framework\Console\Command |
| 62 | 62 | * @template T |
| 63 | 63 | */ |
| 64 | -class RouteCommand extends Command |
|
| 65 | -{ |
|
| 64 | +class RouteCommand extends Command { |
|
| 66 | 65 | /** |
| 67 | 66 | * The configuration instance |
| 68 | 67 | * @var Config<T> |
@@ -77,8 +76,7 @@ discard block |
||
| 77 | 76 | * @param Config<T> $config |
| 78 | 77 | * @param Router $router |
| 79 | 78 | */ |
| 80 | - public function __construct(Application $application, Config $config, Router $router) |
|
| 81 | - { |
|
| 79 | + public function __construct(Application $application, Config $config, Router $router) { |
|
| 82 | 80 | parent::__construct('route', 'Command to manage route'); |
| 83 | 81 | |
| 84 | 82 | $this->addOption('-l|--list', 'Show route list', null, false); |
@@ -91,8 +89,7 @@ discard block |
||
| 91 | 89 | /** |
| 92 | 90 | * {@inheritodc} |
| 93 | 91 | */ |
| 94 | - public function execute() |
|
| 95 | - { |
|
| 92 | + public function execute() { |
|
| 96 | 93 | if ($this->getOptionValue('list')) { |
| 97 | 94 | $this->showRouteList(); |
| 98 | 95 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ) { |
| 83 | 83 | parent::__construct($app, $repository, $config, $filesystem); |
| 84 | 84 | $this->setName('migration:init') |
| 85 | - ->setDescription('Initialize the migration by creating migration table'); |
|
| 85 | + ->setDescription('Initialize the migration by creating migration table'); |
|
| 86 | 86 | |
| 87 | 87 | $this->schema = $schema; |
| 88 | 88 | } |
@@ -120,10 +120,10 @@ discard block |
||
| 120 | 120 | $tableName = $this->table; |
| 121 | 121 | $this->schema->create($tableName, function (CreateTable $table) { |
| 122 | 122 | $table->string('version', 20) |
| 123 | - ->description('The migration version') |
|
| 124 | - ->primary(); |
|
| 123 | + ->description('The migration version') |
|
| 124 | + ->primary(); |
|
| 125 | 125 | $table->string('description') |
| 126 | - ->description('The migration description'); |
|
| 126 | + ->description('The migration description'); |
|
| 127 | 127 | $table->datetime('created_at') |
| 128 | 128 | ->description('Migration run time'); |
| 129 | 129 | |
@@ -54,15 +54,13 @@ |
||
| 54 | 54 | * @class MigrationRepository |
| 55 | 55 | * @package Platine\Framework\Migration |
| 56 | 56 | */ |
| 57 | -class MigrationRepository extends Repository |
|
| 58 | -{ |
|
| 57 | +class MigrationRepository extends Repository { |
|
| 59 | 58 | |
| 60 | 59 | /** |
| 61 | 60 | * Create new instance |
| 62 | 61 | * @param EntityManager $manager |
| 63 | 62 | */ |
| 64 | - public function __construct(EntityManager $manager) |
|
| 65 | - { |
|
| 63 | + public function __construct(EntityManager $manager) { |
|
| 66 | 64 | parent::__construct($manager, MigrationEntity::class); |
| 67 | 65 | } |
| 68 | 66 | } |
@@ -56,8 +56,7 @@ |
||
| 56 | 56 | * @class MigrationEntity |
| 57 | 57 | * @package Platine\Framework\Migration |
| 58 | 58 | */ |
| 59 | -class MigrationEntity extends Entity |
|
| 60 | -{ |
|
| 59 | +class MigrationEntity extends Entity { |
|
| 61 | 60 | |
| 62 | 61 | /** |
| 63 | 62 | * {@inheritdoc} |