Passed
Push — master ( d7b7f6...11848a )
by nguereza
02:42
created
app/Model/Entity/Product.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,21 +16,21 @@
 block discarded – undo
16 16
 class Product extends Entity
17 17
 {
18 18
     /**
19
-    * @param EntityMapperInterface<Product> $mapper
20
-    * @return void
21
-    */
19
+     * @param EntityMapperInterface<Product> $mapper
20
+     * @return void
21
+     */
22 22
     public static function mapEntity(EntityMapperInterface $mapper): void
23 23
     {
24
-         $mapper->useTimestamp();
25
-         $mapper->casts([
24
+            $mapper->useTimestamp();
25
+            $mapper->casts([
26 26
             'created_at' => 'date',
27 27
             'updated_at' => '?date',
28
-         ]);
28
+            ]);
29 29
 
30
-         $mapper->relation('category')->belongsTo(ProductCategory::class);
30
+            $mapper->relation('category')->belongsTo(ProductCategory::class);
31 31
 
32
-         $mapper->filter('category', function (Query $q, $value) {
33
-             $q->where('product_category_id')->is($value);
34
-         });
32
+            $mapper->filter('category', function (Query $q, $value) {
33
+                $q->where('product_category_id')->is($value);
34
+            });
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
app/Param/ProductParam.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -15,40 +15,40 @@  discard block
 block discarded – undo
15 15
 class ProductParam extends BaseParam
16 16
 {
17 17
     /**
18
-    * The name field
19
-    * @var string
20
-    */
18
+     * The name field
19
+     * @var string
20
+     */
21 21
     protected string $name;
22 22
 
23 23
     /**
24
-    * The description field
25
-    * @var string|null
26
-    */
24
+     * The description field
25
+     * @var string|null
26
+     */
27 27
     protected ?string $description = null;
28 28
 
29 29
     /**
30
-    * The price field
31
-    * @var float
32
-    */
30
+     * The price field
31
+     * @var float
32
+     */
33 33
     protected float $price = 0;
34 34
 
35 35
     /**
36
-    * The quantity field
37
-    * @var float
38
-    */
36
+     * The quantity field
37
+     * @var float
38
+     */
39 39
     protected float $quantity = 0;
40 40
 
41 41
     /**
42
-    * The category field
43
-    * @var int
44
-    */
42
+     * The category field
43
+     * @var int
44
+     */
45 45
     protected int $category;
46 46
 
47 47
 
48 48
     /**
49
-    * @param TEntity $entity
50
-    * @return $this
51
-    */
49
+     * @param TEntity $entity
50
+     * @return $this
51
+     */
52 52
     public function fromEntity(Entity $entity): self
53 53
     {
54 54
         $this->name = $entity->name;
@@ -61,45 +61,45 @@  discard block
 block discarded – undo
61 61
     }
62 62
 
63 63
     /**
64
-    * Return the name value
65
-    * @return string
66
-    */
64
+     * Return the name value
65
+     * @return string
66
+     */
67 67
     public function getName(): string
68 68
     {
69 69
         return $this->name;
70 70
     }
71 71
 
72
-   /**
73
-    * Return the description value
74
-    * @return string|null
75
-    */
72
+    /**
73
+     * Return the description value
74
+     * @return string|null
75
+     */
76 76
     public function getDescription(): ?string
77 77
     {
78 78
         return $this->description;
79 79
     }
80 80
 
81
-   /**
82
-    * Return the price value
83
-    * @return float
84
-    */
81
+    /**
82
+     * Return the price value
83
+     * @return float
84
+     */
85 85
     public function getPrice(): float
86 86
     {
87 87
         return $this->price;
88 88
     }
89 89
 
90
-   /**
91
-    * Return the quantity value
92
-    * @return float
93
-    */
90
+    /**
91
+     * Return the quantity value
92
+     * @return float
93
+     */
94 94
     public function getQuantity(): float
95 95
     {
96 96
         return $this->quantity;
97 97
     }
98 98
 
99
-   /**
100
-    * Return the category value
101
-    * @return int
102
-    */
99
+    /**
100
+     * Return the category value
101
+     * @return int
102
+     */
103 103
     public function getCategory(): int
104 104
     {
105 105
         return $this->category;
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
 
108 108
 
109 109
     /**
110
-    * Set the name value
111
-    * @param string $name
112
-    * @return $this
113
-    */
110
+     * Set the name value
111
+     * @param string $name
112
+     * @return $this
113
+     */
114 114
     public function setName(string $name): self
115 115
     {
116 116
         $this->name = $name;
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
         return $this;
119 119
     }
120 120
 
121
-   /**
122
-    * Set the description value
123
-    * @param string|null $description
124
-    * @return $this
125
-    */
121
+    /**
122
+     * Set the description value
123
+     * @param string|null $description
124
+     * @return $this
125
+     */
126 126
     public function setDescription(?string $description): self
127 127
     {
128 128
         $this->description = $description;
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
         return $this;
131 131
     }
132 132
 
133
-   /**
134
-    * Set the price value
135
-    * @param float $price
136
-    * @return $this
137
-    */
133
+    /**
134
+     * Set the price value
135
+     * @param float $price
136
+     * @return $this
137
+     */
138 138
     public function setPrice(float $price): self
139 139
     {
140 140
         $this->price = $price;
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
         return $this;
143 143
     }
144 144
 
145
-   /**
146
-    * Set the quantity value
147
-    * @param float $quantity
148
-    * @return $this
149
-    */
145
+    /**
146
+     * Set the quantity value
147
+     * @param float $quantity
148
+     * @return $this
149
+     */
150 150
     public function setQuantity(float $quantity): self
151 151
     {
152 152
         $this->quantity = $quantity;
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
         return $this;
155 155
     }
156 156
 
157
-   /**
158
-    * Set the category value
159
-    * @param int $category
160
-    * @return $this
161
-    */
157
+    /**
158
+     * Set the category value
159
+     * @param int $category
160
+     * @return $this
161
+     */
162 162
     public function setCategory(int $category): self
163 163
     {
164 164
         $this->category = $category;
Please login to merge, or discard this patch.
app/Validator/ProductValidator.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
 class ProductValidator extends AbstractValidator
23 23
 {
24 24
     /**
25
-    * The parameter instance
26
-    * @var ProductParam<TEntity>
27
-    */
25
+     * The parameter instance
26
+     * @var ProductParam<TEntity>
27
+     */
28 28
     protected ProductParam $param;
29 29
 
30 30
     /**
31
-    * Create new instance
32
-    * @param ProductParam<TEntity> $param
33
-    * @param Lang $lang
34
-    */
31
+     * Create new instance
32
+     * @param ProductParam<TEntity> $param
33
+     * @param Lang $lang
34
+     */
35 35
     public function __construct(ProductParam $param, Lang $lang)
36 36
     {
37 37
         parent::__construct($lang);
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-    * {@inheritdoc}
43
-    */
42
+     * {@inheritdoc}
43
+     */
44 44
     public function setValidationData(): void
45 45
     {
46 46
         $this->addData('name', $this->param->getName());
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     }
52 52
 
53 53
     /**
54
-    * {@inheritdoc}
55
-    */
54
+     * {@inheritdoc}
55
+     */
56 56
     public function setValidationRules(): void
57 57
     {
58 58
         $this->addRules('name', [
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000005_users_seed.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000000_permissions_seed.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000001_product_categories_seed.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000003_roles_seed.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000004_roles_permissions_seed.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000002_products_seed.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.