@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('product_categories', function (CreateTable $table) { |
|
| 15 | + $this->create('product_categories', function(CreateTable $table) { |
|
| 16 | 16 | $table->integer('id') |
| 17 | 17 | ->autoincrement() |
| 18 | 18 | ->primary(); |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | use Platine\Database\Schema\CreateTable; |
| 7 | 7 | use Platine\Framework\Migration\AbstractMigration; |
| 8 | 8 | |
| 9 | -class AddProductCategoriesTable20231207053927 extends AbstractMigration |
|
| 10 | -{ |
|
| 9 | +class AddProductCategoriesTable20231207053927 extends AbstractMigration { |
|
| 11 | 10 | |
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function addRoutes(Router $router): void |
| 32 | 32 | { |
| 33 | - $router->group('/product', function (Router $router) { |
|
| 33 | + $router->group('/product', function(Router $router) { |
|
| 34 | 34 | $router->resource('/category', CategoryAction::class, 'product_category'); |
| 35 | 35 | }); |
| 36 | 36 | } |
@@ -13,8 +13,7 @@ |
||
| 13 | 13 | * @class ProductServiceProvider |
| 14 | 14 | * @package Platine\App\Provider |
| 15 | 15 | */ |
| 16 | -class ProductServiceProvider extends ServiceProvider |
|
| 17 | -{ |
|
| 16 | +class ProductServiceProvider extends ServiceProvider { |
|
| 18 | 17 | /** |
| 19 | 18 | * {@inheritdoc} |
| 20 | 19 | */ |
@@ -13,14 +13,12 @@ |
||
| 13 | 13 | * @package Platine\App\Model\Repository |
| 14 | 14 | * @extends Repository<ProductCategory> |
| 15 | 15 | */ |
| 16 | -class ProductCategoryRepository extends Repository |
|
| 17 | -{ |
|
| 16 | +class ProductCategoryRepository extends Repository { |
|
| 18 | 17 | /** |
| 19 | 18 | * Create new instance |
| 20 | 19 | * @param EntityManager<ProductCategory> $manager |
| 21 | 20 | */ |
| 22 | - public function __construct(EntityManager $manager) |
|
| 23 | - { |
|
| 21 | + public function __construct(EntityManager $manager) { |
|
| 24 | 22 | parent::__construct($manager, ProductCategory::class); |
| 25 | 23 | } |
| 26 | 24 | } |
@@ -12,8 +12,7 @@ |
||
| 12 | 12 | * @package Platine\App\Model\Entity |
| 13 | 13 | * @extends Entity<ProductCategory> |
| 14 | 14 | */ |
| 15 | -class ProductCategory extends Entity |
|
| 16 | -{ |
|
| 15 | +class ProductCategory extends Entity { |
|
| 17 | 16 | /** |
| 18 | 17 | * @param EntityMapperInterface<ProductCategory> $mapper |
| 19 | 18 | * @return void |
@@ -25,8 +25,7 @@ |
||
| 25 | 25 | * @class CategoryAction |
| 26 | 26 | * @package Platine\App\Http\Action\Product |
| 27 | 27 | */ |
| 28 | -class CategoryAction |
|
| 29 | -{ |
|
| 28 | +class CategoryAction { |
|
| 30 | 29 | /** |
| 31 | 30 | * The Lang instance |
| 32 | 31 | * @var Lang |
@@ -12,8 +12,7 @@ |
||
| 12 | 12 | * @package Platine\App\Param |
| 13 | 13 | * @template TEntity as Entity |
| 14 | 14 | */ |
| 15 | -class ProductCategoryParam extends BaseParam |
|
| 16 | -{ |
|
| 15 | +class ProductCategoryParam extends BaseParam { |
|
| 17 | 16 | /** |
| 18 | 17 | * The name field |
| 19 | 18 | * @var string |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | * @package Platine\App\Validator |
| 17 | 17 | * @template TEntity as \Platine\Orm\Entity |
| 18 | 18 | */ |
| 19 | -class ProductCategoryValidator extends AbstractValidator |
|
| 20 | -{ |
|
| 19 | +class ProductCategoryValidator extends AbstractValidator { |
|
| 21 | 20 | /** |
| 22 | 21 | * The parameter instance |
| 23 | 22 | * @var ProductCategoryParam<TEntity> |
@@ -29,8 +28,7 @@ discard block |
||
| 29 | 28 | * @param ProductCategoryParam<TEntity> $param |
| 30 | 29 | * @param Lang $lang |
| 31 | 30 | */ |
| 32 | - public function __construct(ProductCategoryParam $param, Lang $lang) |
|
| 33 | - { |
|
| 31 | + public function __construct(ProductCategoryParam $param, Lang $lang) { |
|
| 34 | 32 | parent::__construct($lang); |
| 35 | 33 | $this->param = $param; |
| 36 | 34 | } |