Passed
Push — master ( 99dff0...760b10 )
by Luiz Kim
06:13 queued 03:58
created
src/Entity/ProductFile.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
         new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'),
24 24
         new Put(
25 25
             security: 'is_granted(\'ROLE_CLIENT\')',
26
-            denormalizationContext: ['groups' => ['product_file:write']]
26
+            denormalizationContext: [ 'groups' => [ 'product_file:write' ] ]
27 27
         ),
28 28
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
29 29
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
30 30
         new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')')
31 31
     ],
32
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
33
-    normalizationContext: ['groups' => ['product_file:read']],
34
-    denormalizationContext: ['groups' => ['product_file:write']]
35
-)]
36
-#[ORM\Table(name: 'product_file')]
37
-#[ORM\Index(name: 'file_id', columns: ['file_id'])]
38
-#[ORM\Index(name: 'IDX_CDFC73564584665B', columns: ['product_id'])]
39
-#[ORM\UniqueConstraint(name: 'product_id', columns: ['product_id', 'file_id'])]
40
-#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductFileRepository::class)]
32
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
33
+    normalizationContext: [ 'groups' => [ 'product_file:read' ] ],
34
+    denormalizationContext: [ 'groups' => [ 'product_file:write' ] ]
35
+) ]
36
+#[ORM\Table(name: 'product_file') ]
37
+#[ORM\Index(name: 'file_id', columns: [ 'file_id' ]) ]
38
+#[ORM\Index(name: 'IDX_CDFC73564584665B', columns: [ 'product_id' ]) ]
39
+#[ORM\UniqueConstraint(name: 'product_id', columns: [ 'product_id', 'file_id' ]) ]
40
+#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductFileRepository::class) ]
41 41
 class ProductFile
42 42
 {
43 43
     /**
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @Groups({"product:read","order_product:read","product_file:read","product_category:read"})
47 47
      */
48
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
49
-    #[ORM\Id]
50
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
48
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
49
+    #[ORM\Id ]
50
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
51 51
     private $id;
52 52
 
53 53
     /**
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @Groups({"product:read","order_product:read","product_file:read","product_file:write","product_category:read"})
57 57
      */
58
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['file' => 'exact'])]
59
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['file.fileType' => 'exact'])]
60
-    #[ORM\JoinColumn(name: 'file_id', referencedColumnName: 'id')]
61
-    #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\File::class)]
58
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'file' => 'exact' ]) ]
59
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'file.fileType' => 'exact' ]) ]
60
+    #[ORM\JoinColumn(name: 'file_id', referencedColumnName: 'id') ]
61
+    #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\File::class) ]
62 62
 
63 63
     private $file;
64 64
 
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
      *
68 68
      * @Groups({"product_file:read","product_file:write"})
69 69
      */
70
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'exact'])]
71
-    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id')]
72
-    #[ORM\ManyToOne(targetEntity: \Product::class)]
70
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'exact' ]) ]
71
+    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id') ]
72
+    #[ORM\ManyToOne(targetEntity: \Product::class) ]
73 73
 
74 74
     private $product;
75 75
 
Please login to merge, or discard this patch.
src/Entity/ProductGroupProduct.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -23,20 +23,20 @@  discard block
 block discarded – undo
23 23
         new Get(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')',),
24 24
         new Put(
25 25
             security: 'is_granted(\'ROLE_CLIENT\')',
26
-            denormalizationContext: ['groups' => ['product_group_product:write']]
26
+            denormalizationContext: [ 'groups' => [ 'product_group_product:write' ] ]
27 27
         ),
28 28
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
29 29
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
30 30
         new GetCollection(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')',)
31 31
     ],
32
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
33
-    normalizationContext: ['groups' => ['product_group_product:read']],
34
-    denormalizationContext: ['groups' => ['product_group_product:write']]
35
-)]
32
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
33
+    normalizationContext: [ 'groups' => [ 'product_group_product:read' ] ],
34
+    denormalizationContext: [ 'groups' => [ 'product_group_product:write' ] ]
35
+) ]
36 36
 
37
-#[ApiFilter(OrderFilter::class, properties: ['productGroup.productGroup' => 'ASC', 'product.product' => 'ASC'])]
38
-#[ORM\Table(name: 'product_group_product')]
39
-#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupProductRepository::class)]
37
+#[ApiFilter(OrderFilter::class, properties: [ 'productGroup.productGroup' => 'ASC', 'product.product' => 'ASC' ]) ]
38
+#[ORM\Table(name: 'product_group_product') ]
39
+#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupProductRepository::class) ]
40 40
 
41 41
 class ProductGroupProduct
42 42
 {
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
47 47
      */
48
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])]
49
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
50
-    #[ORM\Id]
51
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
48
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'id' => 'exact' ]) ]
49
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
50
+    #[ORM\Id ]
51
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
52 52
 
53 53
     private $id;
54 54
 
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
59 59
      */
60
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'exact'])]
61
-    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false)]
62
-    #[ORM\ManyToOne(targetEntity: \Product::class)]
60
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'exact' ]) ]
61
+    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false) ]
62
+    #[ORM\ManyToOne(targetEntity: \Product::class) ]
63 63
 
64 64
     private $product;
65 65
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
70 70
      */
71
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['productGroup' => 'exact'])]
72
-    #[ORM\JoinColumn(name: 'product_group_id', referencedColumnName: 'id', nullable: true)]
73
-    #[ORM\ManyToOne(targetEntity: \ProductGroup::class)]
71
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productGroup' => 'exact' ]) ]
72
+    #[ORM\JoinColumn(name: 'product_group_id', referencedColumnName: 'id', nullable: true) ]
73
+    #[ORM\ManyToOne(targetEntity: \ProductGroup::class) ]
74 74
 
75 75
     private $productGroup;
76 76
 
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
      *
80 80
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
81 81
      */
82
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['productType' => 'exact'])]
83
-    #[ORM\Column(name: 'product_type', type: 'string', columnDefinition: "ENUM('feedstock', 'component', 'package')", nullable: false)]
82
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productType' => 'exact' ]) ]
83
+    #[ORM\Column(name: 'product_type', type: 'string', columnDefinition: "ENUM('feedstock', 'component', 'package')", nullable: false) ]
84 84
 
85 85
     private $productType;
86 86
 
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
91 91
      */
92
-    #[ORM\JoinColumn(name: 'product_child_id', referencedColumnName: 'id', nullable: true)]
93
-    #[ORM\ManyToOne(targetEntity: \Product::class)]
92
+    #[ORM\JoinColumn(name: 'product_child_id', referencedColumnName: 'id', nullable: true) ]
93
+    #[ORM\ManyToOne(targetEntity: \Product::class) ]
94 94
     private $productChild;
95 95
 
96 96
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      *
99 99
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
100 100
      */
101
-    #[ORM\Column(name: 'quantity', type: 'float', precision: 10, scale: 2, nullable: false, options: ['default' => '1.00'])]
101
+    #[ORM\Column(name: 'quantity', type: 'float', precision: 10, scale: 2, nullable: false, options: [ 'default' => '1.00' ]) ]
102 102
     private $quantity = 0;
103 103
 
104 104
     /**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      *
107 107
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
108 108
      */
109
-    #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 2, nullable: false)]
109
+    #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 2, nullable: false) ]
110 110
     private $price = 0;
111 111
 
112 112
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      *
115 115
      * @Groups({"product_group_product:read","product_group:write","product_group_product:write"})
116 116
      */
117
-    #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: ['default' => '1'])]
117
+    #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: [ 'default' => '1' ]) ]
118 118
     private $active = true;
119 119
 
120 120
     /**
Please login to merge, or discard this patch.
src/Entity/Product.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -27,150 +27,150 @@
 block discarded – undo
27 27
 #[ApiResource(
28 28
     operations: [
29 29
         new Get(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')'),
30
-        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['product:write']]),
30
+        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'product:write' ] ]),
31 31
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
32 32
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
33 33
         new GetCollection(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')'),
34 34
     ],
35
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
36
-    normalizationContext: ['groups' => ['product:read']],
37
-    denormalizationContext: ['groups' => ['product:write']]
38
-)]
39
-#[ApiFilter(OrderFilter::class, properties: ['product', 'price', 'description'])]
40
-#[ApiFilter(RandomOrderFilter::class)]
41
-#[ORM\Table(name: 'product')]
42
-#[ORM\Index(name: 'product_unity_id', columns: ['product_unity_id'])]
43
-#[ORM\Index(name: 'IDX_D34A04AD979B1AD6', columns: ['company_id'])]
44
-#[ORM\Index(name: 'default_out_inventory_id', columns: ['default_out_inventory_id'])]
45
-#[ORM\Index(name: 'default_in_inventory_id', columns: ['default_in_inventory_id'])]
46
-#[ORM\UniqueConstraint(name: 'company_id', columns: ['company_id', 'sku'])]
47
-#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductRepository::class)]
35
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
36
+    normalizationContext: [ 'groups' => [ 'product:read' ] ],
37
+    denormalizationContext: [ 'groups' => [ 'product:write' ] ]
38
+) ]
39
+#[ApiFilter(OrderFilter::class, properties: [ 'product', 'price', 'description' ]) ]
40
+#[ApiFilter(RandomOrderFilter::class) ]
41
+#[ORM\Table(name: 'product') ]
42
+#[ORM\Index(name: 'product_unity_id', columns: [ 'product_unity_id' ]) ]
43
+#[ORM\Index(name: 'IDX_D34A04AD979B1AD6', columns: [ 'company_id' ]) ]
44
+#[ORM\Index(name: 'default_out_inventory_id', columns: [ 'default_out_inventory_id' ]) ]
45
+#[ORM\Index(name: 'default_in_inventory_id', columns: [ 'default_in_inventory_id' ]) ]
46
+#[ORM\UniqueConstraint(name: 'company_id', columns: [ 'company_id', 'sku' ]) ]
47
+#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductRepository::class) ]
48 48
 class Product
49 49
 {
50 50
     /**
51 51
      * @var int
52 52
      * @Groups({"product_category:read","product:read","order_product:read"})
53 53
      */
54
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])]
55
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
56
-    #[ORM\Id]
57
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
54
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'id' => 'exact' ]) ]
55
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
56
+    #[ORM\Id ]
57
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
58 58
     private $id;
59 59
 
60 60
     /**
61 61
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
62 62
      */
63
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'partial'])]
64
-    #[ORM\Column(name: 'product', type: 'string', length: 255, nullable: true)]
63
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'partial' ]) ]
64
+    #[ORM\Column(name: 'product', type: 'string', length: 255, nullable: true) ]
65 65
     private $product;
66 66
 
67 67
     /**
68 68
      * @Groups({"product:read","product_category:read","order_product:read"})
69 69
      */
70
-    #[ApiFilter(filterClass: ExistsFilter::class, properties: ['productFiles'])]
71
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['productFiles.file.fileType' => 'exact'])]
72
-    #[ORM\OneToMany(targetEntity: \ProductFile::class, mappedBy: 'product')]
70
+    #[ApiFilter(filterClass: ExistsFilter::class, properties: [ 'productFiles' ]) ]
71
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productFiles.file.fileType' => 'exact' ]) ]
72
+    #[ORM\OneToMany(targetEntity: \ProductFile::class, mappedBy: 'product') ]
73 73
     private $productFiles;
74 74
 
75
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['productCategory.category' => 'exact'])]
76
-    #[ORM\OneToMany(targetEntity: \ProductCategory::class, mappedBy: 'product')]
75
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productCategory.category' => 'exact' ]) ]
76
+    #[ORM\OneToMany(targetEntity: \ProductCategory::class, mappedBy: 'product') ]
77 77
     private $productCategory;
78 78
 
79 79
     /**
80 80
      * @var string|null
81 81
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
82 82
      */
83
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['sku' => 'partial'])]
84
-    #[ORM\Column(name: 'sku', type: 'string', length: 32, nullable: true, options: ['default' => 'NULL'])]
83
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'sku' => 'partial' ]) ]
84
+    #[ORM\Column(name: 'sku', type: 'string', length: 32, nullable: true, options: [ 'default' => 'NULL' ]) ]
85 85
     private $sku = null;
86 86
 
87 87
     /**
88 88
      * @var string
89 89
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
90 90
      */
91
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['type' => 'exact'])]
92
-    #[ORM\Column(name: 'type', type: 'string', length: 0, nullable: false, options: ['default' => "'product'"])]
91
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'type' => 'exact' ]) ]
92
+    #[ORM\Column(name: 'type', type: 'string', length: 0, nullable: false, options: [ 'default' => "'product'" ]) ]
93 93
     private $type = 'product';
94 94
 
95 95
     /**
96 96
      * @var float
97 97
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
98 98
      */
99
-    #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 0, nullable: false)]
99
+    #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 0, nullable: false) ]
100 100
     private $price = 0;
101 101
 
102 102
     /**
103 103
      * @var string
104 104
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
105 105
      */
106
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['productCondition' => 'exact'])]
107
-    #[ORM\Column(name: 'product_condition', type: 'string', length: 0, nullable: false, options: ['default' => "'new'"])]
106
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productCondition' => 'exact' ]) ]
107
+    #[ORM\Column(name: 'product_condition', type: 'string', length: 0, nullable: false, options: [ 'default' => "'new'" ]) ]
108 108
     private $productCondition = 'new';
109 109
 
110 110
     /**
111 111
      * @var string
112 112
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
113 113
      */
114
-    #[ORM\Column(name: 'description', type: 'string', length: 0, nullable: false)]
114
+    #[ORM\Column(name: 'description', type: 'string', length: 0, nullable: false) ]
115 115
     private $description = '';
116 116
 
117 117
     /**
118 118
      * @var bool
119 119
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
120 120
      */
121
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['featured' => 'exact'])]
122
-    #[ORM\Column(name: 'featured', type: 'boolean', nullable: false, options: ['default' => '0'])]
121
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'featured' => 'exact' ]) ]
122
+    #[ORM\Column(name: 'featured', type: 'boolean', nullable: false, options: [ 'default' => '0' ]) ]
123 123
     private $featured = false;
124 124
 
125 125
     /**
126 126
      * @var bool
127 127
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
128 128
      */
129
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['active' => 'exact'])]
130
-    #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: ['default' => '1'])]
129
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'active' => 'exact' ]) ]
130
+    #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: [ 'default' => '1' ]) ]
131 131
     private $active = true;
132 132
 
133 133
     /**
134 134
      * @var \ControleOnline\Entity\People
135 135
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
136 136
      */
137
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['company' => 'exact'])]
138
-    #[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id')]
139
-    #[ORM\ManyToOne(targetEntity: People::class)]
137
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'company' => 'exact' ]) ]
138
+    #[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id') ]
139
+    #[ORM\ManyToOne(targetEntity: People::class) ]
140 140
     private $company;
141 141
 
142 142
     /**
143 143
      * @var ProductUnity
144 144
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
145 145
      */
146
-    #[ORM\JoinColumn(name: 'product_unity_id', referencedColumnName: 'id')]
147
-    #[ORM\ManyToOne(targetEntity: \ProductUnity::class)]
146
+    #[ORM\JoinColumn(name: 'product_unity_id', referencedColumnName: 'id') ]
147
+    #[ORM\ManyToOne(targetEntity: \ProductUnity::class) ]
148 148
     private $productUnit;
149 149
 
150 150
     /**
151 151
      * @var Queue
152 152
      * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"})
153 153
      */
154
-    #[ORM\JoinColumn(name: 'queue_id', referencedColumnName: 'id')]
155
-    #[ORM\ManyToOne(targetEntity: \Queue::class)]
154
+    #[ORM\JoinColumn(name: 'queue_id', referencedColumnName: 'id') ]
155
+    #[ORM\ManyToOne(targetEntity: \Queue::class) ]
156 156
     private $queue;
157 157
 
158 158
     /**
159 159
      * @var \ControleOnline\Entity\Inventory
160 160
      * @Groups({"product:read", "product:write"})
161 161
      */
162
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['defaultOutInventory' => 'exact'])]
163
-    #[ORM\JoinColumn(name: 'default_out_inventory_id', referencedColumnName: 'id', nullable: true)]
164
-    #[ORM\ManyToOne(targetEntity: Inventory::class)]
162
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'defaultOutInventory' => 'exact' ]) ]
163
+    #[ORM\JoinColumn(name: 'default_out_inventory_id', referencedColumnName: 'id', nullable: true) ]
164
+    #[ORM\ManyToOne(targetEntity: Inventory::class) ]
165 165
     private $defaultOutInventory;
166 166
 
167 167
     /**
168 168
      * @var \ControleOnline\Entity\Inventory
169 169
      * @Groups({"product:read", "product:write"})
170 170
      */
171
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['defaultInInventory' => 'exact'])]
172
-    #[ORM\JoinColumn(name: 'default_in_inventory_id', referencedColumnName: 'id', nullable: true)]
173
-    #[ORM\ManyToOne(targetEntity: Inventory::class)]
171
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'defaultInInventory' => 'exact' ]) ]
172
+    #[ORM\JoinColumn(name: 'default_in_inventory_id', referencedColumnName: 'id', nullable: true) ]
173
+    #[ORM\ManyToOne(targetEntity: Inventory::class) ]
174 174
     private $defaultInInventory;
175 175
 
176 176
     public function __construct()
Please login to merge, or discard this patch.
src/Entity/Inventory.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -22,51 +22,51 @@
 block discarded – undo
22 22
 #[ApiResource(
23 23
     operations: [
24 24
         new Get(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')'),
25
-        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['inventory:write']]),
25
+        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'inventory:write' ] ]),
26 26
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
27 27
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
28 28
         new GetCollection(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')'),
29 29
     ],
30
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
31
-    normalizationContext: ['groups' => ['inventory:read']],
32
-    denormalizationContext: ['groups' => ['inventory:write']]
33
-)]
34
-#[ApiFilter(OrderFilter::class, properties: ['inventory', 'type'])]
35
-#[ApiFilter(SearchFilter::class, properties: ['id' => 'exact', 'inventory' => 'partial', 'type' => 'exact', 'people' => 'exact'])]
36
-#[ORM\Table(name: 'inventory')]
37
-#[ORM\Index(name: 'people_id', columns: ['people_id'])]
38
-#[ORM\Entity(repositoryClass: \ControleOnline\Repository\InventoryRepository::class)]
30
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
31
+    normalizationContext: [ 'groups' => [ 'inventory:read' ] ],
32
+    denormalizationContext: [ 'groups' => [ 'inventory:write' ] ]
33
+) ]
34
+#[ApiFilter(OrderFilter::class, properties: [ 'inventory', 'type' ]) ]
35
+#[ApiFilter(SearchFilter::class, properties: [ 'id' => 'exact', 'inventory' => 'partial', 'type' => 'exact', 'people' => 'exact' ]) ]
36
+#[ORM\Table(name: 'inventory') ]
37
+#[ORM\Index(name: 'people_id', columns: [ 'people_id' ]) ]
38
+#[ORM\Entity(repositoryClass: \ControleOnline\Repository\InventoryRepository::class) ]
39 39
 class Inventory
40 40
 {
41 41
     /**
42 42
      * @var int
43 43
      * @Groups({"inventory:read", "inventory:write"})
44 44
      */
45
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
46
-    #[ORM\Id]
47
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
45
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
46
+    #[ORM\Id ]
47
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
48 48
     private $id;
49 49
 
50 50
     /**
51 51
      * @var string
52 52
      * @Groups({"inventory:read", "inventory:write"})
53 53
      */
54
-    #[ORM\Column(name: 'inventory', type: 'string', length: 255, nullable: false)]
54
+    #[ORM\Column(name: 'inventory', type: 'string', length: 255, nullable: false) ]
55 55
     private $inventory;
56 56
 
57 57
     /**
58 58
      * @var string
59 59
      * @Groups({"inventory:read", "inventory:write"})
60 60
      */
61
-    #[ORM\Column(name: 'type', type: 'string', length: 50, nullable: false)]
61
+    #[ORM\Column(name: 'type', type: 'string', length: 50, nullable: false) ]
62 62
     private $type;
63 63
 
64 64
     /**
65 65
      * @var \ControleOnline\Entity\People
66 66
      * @Groups({"inventory:read", "inventory:write"})
67 67
      */
68
-    #[ORM\JoinColumn(name: 'people_id', referencedColumnName: 'id', nullable: false)]
69
-    #[ORM\ManyToOne(targetEntity: People::class)]
68
+    #[ORM\JoinColumn(name: 'people_id', referencedColumnName: 'id', nullable: false) ]
69
+    #[ORM\ManyToOne(targetEntity: People::class) ]
70 70
     private $people;
71 71
 
72 72
     public function getId(): ?int
Please login to merge, or discard this patch.
src/Entity/ProductCategory.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -23,22 +23,22 @@  discard block
 block discarded – undo
23 23
         new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'),
24 24
         new Put(
25 25
             security: 'is_granted(\'ROLE_CLIENT\')',
26
-            denormalizationContext: ['groups' => ['product_category:write']]
26
+            denormalizationContext: [ 'groups' => [ 'product_category:write' ] ]
27 27
         ),
28 28
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
29 29
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
30 30
         new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')')
31 31
     ],
32
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
33
-    normalizationContext: ['groups' => ['product_category:read']],
34
-    denormalizationContext: ['groups' => ['product_category:write']]
35
-)]
36
-#[ApiFilter(OrderFilter::class, properties: ['product.product'])]
37
-#[ORM\Table(name: 'product_category')]
38
-#[ORM\Index(name: 'category_id', columns: ['category_id'])]
39
-#[ORM\Index(name: 'IDX_CDFC73564584665A', columns: ['product_id'])]
40
-#[ORM\UniqueConstraint(name: 'product_id', columns: ['product_id', 'category_id'])]
41
-#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductCategoryRepository::class)]
32
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
33
+    normalizationContext: [ 'groups' => [ 'product_category:read' ] ],
34
+    denormalizationContext: [ 'groups' => [ 'product_category:write' ] ]
35
+) ]
36
+#[ApiFilter(OrderFilter::class, properties: [ 'product.product' ]) ]
37
+#[ORM\Table(name: 'product_category') ]
38
+#[ORM\Index(name: 'category_id', columns: [ 'category_id' ]) ]
39
+#[ORM\Index(name: 'IDX_CDFC73564584665A', columns: [ 'product_id' ]) ]
40
+#[ORM\UniqueConstraint(name: 'product_id', columns: [ 'product_id', 'category_id' ]) ]
41
+#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductCategoryRepository::class) ]
42 42
 
43 43
 class ProductCategory
44 44
 {
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @Groups({"product_category:read"})
49 49
      */
50
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
51
-    #[ORM\Id]
52
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
50
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
51
+    #[ORM\Id ]
52
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
53 53
     private $id;
54 54
 
55 55
     /**
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @Groups({"product_category:read","product_category:write"})
59 59
      */
60
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['category' => 'exact'])]
61
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['category.company' => 'exact'])]
62
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['category.context' => 'exact'])]
63
-    #[ORM\JoinColumn(name: 'category_id', referencedColumnName: 'id')]
64
-    #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\Category::class)]
60
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'category' => 'exact' ]) ]
61
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'category.company' => 'exact' ]) ]
62
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'category.context' => 'exact' ]) ]
63
+    #[ORM\JoinColumn(name: 'category_id', referencedColumnName: 'id') ]
64
+    #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\Category::class) ]
65 65
 
66 66
     private $category;
67 67
 
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
      *
71 71
      * @Groups({"product_category:read","product_category:write"})
72 72
      */
73
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'exact'])]
74
-    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id')]
75
-    #[ORM\ManyToOne(targetEntity: \Product::class)]
73
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'exact' ]) ]
74
+    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id') ]
75
+    #[ORM\ManyToOne(targetEntity: \Product::class) ]
76 76
 
77 77
     private $product;
78 78
 
Please login to merge, or discard this patch.
src/Entity/ProductInventory.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -24,46 +24,46 @@  discard block
 block discarded – undo
24 24
 #[ApiResource(
25 25
     operations: [
26 26
         new Get(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')'),
27
-        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['product_inventory:write']]),
27
+        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'product_inventory:write' ] ]),
28 28
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
29 29
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
30 30
         new GetCollection(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')'),
31 31
     ],
32
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
33
-    normalizationContext: ['groups' => ['product_inventory:read']],
34
-    denormalizationContext: ['groups' => ['product_inventory:write']]
35
-)]
36
-#[ApiFilter(OrderFilter::class, properties: ['id', 'available', 'sales', 'ordered', 'transit'])]
37
-#[ApiFilter(SearchFilter::class, properties: ['id' => 'exact', 'inventory' => 'exact', 'product' => 'exact', 'productUnity' => 'exact'])]
38
-#[ORM\Table(name: 'product_inventory')]
39
-#[ORM\Index(name: 'inventory_id', columns: ['inventory_id'])]
40
-#[ORM\Index(name: 'product_id', columns: ['product_id'])]
41
-#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductInventoryRepository::class)]
32
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
33
+    normalizationContext: [ 'groups' => [ 'product_inventory:read' ] ],
34
+    denormalizationContext: [ 'groups' => [ 'product_inventory:write' ] ]
35
+) ]
36
+#[ApiFilter(OrderFilter::class, properties: [ 'id', 'available', 'sales', 'ordered', 'transit' ]) ]
37
+#[ApiFilter(SearchFilter::class, properties: [ 'id' => 'exact', 'inventory' => 'exact', 'product' => 'exact', 'productUnity' => 'exact' ]) ]
38
+#[ORM\Table(name: 'product_inventory') ]
39
+#[ORM\Index(name: 'inventory_id', columns: [ 'inventory_id' ]) ]
40
+#[ORM\Index(name: 'product_id', columns: [ 'product_id' ]) ]
41
+#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductInventoryRepository::class) ]
42 42
 class ProductInventory
43 43
 {
44 44
     /**
45 45
      * @var int
46 46
      * @Groups({"product_inventory:read", "product_inventory:write"})
47 47
      */
48
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
49
-    #[ORM\Id]
50
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
48
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
49
+    #[ORM\Id ]
50
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
51 51
     private $id;
52 52
 
53 53
     /**
54 54
      * @var \ControleOnline\Entity\Inventory
55 55
      * @Groups({"product_inventory:read", "product_inventory:write"})
56 56
      */
57
-    #[ORM\JoinColumn(name: 'inventory_id', referencedColumnName: 'id', nullable: false)]
58
-    #[ORM\ManyToOne(targetEntity: Inventory::class)]
57
+    #[ORM\JoinColumn(name: 'inventory_id', referencedColumnName: 'id', nullable: false) ]
58
+    #[ORM\ManyToOne(targetEntity: Inventory::class) ]
59 59
     private $inventory;
60 60
 
61 61
     /**
62 62
      * @var \ControleOnline\Entity\Product
63 63
      * @Groups({"product_inventory:read", "product_inventory:write"})
64 64
      */
65
-    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false)]
66
-    #[ORM\ManyToOne(targetEntity: Product::class)]
65
+    #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false) ]
66
+    #[ORM\ManyToOne(targetEntity: Product::class) ]
67 67
     private $product;
68 68
 
69 69
 
@@ -72,42 +72,42 @@  discard block
 block discarded – undo
72 72
      * @var int
73 73
      * @Groups({"product_inventory:read", "product_inventory:write"})
74 74
      */
75
-    #[ORM\Column(name: 'available', type: 'integer', nullable: false, options: ['default' => 0])]
75
+    #[ORM\Column(name: 'available', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ]
76 76
     private $available = 0;
77 77
 
78 78
     /**
79 79
      * @var int
80 80
      * @Groups({"product_inventory:read", "product_inventory:write"})
81 81
      */
82
-    #[ORM\Column(name: 'sales', type: 'integer', nullable: false, options: ['default' => 0])]
82
+    #[ORM\Column(name: 'sales', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ]
83 83
     private $sales = 0;
84 84
 
85 85
     /**
86 86
      * @var int
87 87
      * @Groups({"product_inventory:read", "product_inventory:write"})
88 88
      */
89
-    #[ORM\Column(name: 'ordered', type: 'integer', nullable: false, options: ['default' => 0])]
89
+    #[ORM\Column(name: 'ordered', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ]
90 90
     private $ordered = 0;
91 91
 
92 92
     /**
93 93
      * @var int
94 94
      * @Groups({"product_inventory:read", "product_inventory:write"})
95 95
      */
96
-    #[ORM\Column(name: 'transit', type: 'integer', nullable: false, options: ['default' => 0])]
96
+    #[ORM\Column(name: 'transit', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ]
97 97
     private $transit = 0;
98 98
 
99 99
     /**
100 100
      * @var int
101 101
      * @Groups({"product_inventory:read", "product_inventory:write"})
102 102
      */
103
-    #[ORM\Column(name: 'minimum', type: 'integer', nullable: false, options: ['default' => 0])]
103
+    #[ORM\Column(name: 'minimum', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ]
104 104
     private $minimum = 0;
105 105
 
106 106
     /**
107 107
      * @var int
108 108
      * @Groups({"product_inventory:read", "product_inventory:write"})
109 109
      */
110
-    #[ORM\Column(name: 'maximum', type: 'integer', nullable: false, options: ['default' => 0])]
110
+    #[ORM\Column(name: 'maximum', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ]
111 111
     private $maximum = 0;
112 112
 
113 113
     public function getId(): ?int
Please login to merge, or discard this patch.
src/Entity/ProductGroup.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
         new Get(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')',),
27 27
         new Put(
28 28
             security: 'is_granted(\'ROLE_CLIENT\')',
29
-            denormalizationContext: ['groups' => ['product_group:write']]
29
+            denormalizationContext: [ 'groups' => [ 'product_group:write' ] ]
30 30
         ),
31 31
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
32 32
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
33 33
         new GetCollection(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')',)
34 34
     ],
35
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
36
-    normalizationContext: ['groups' => ['product_group:read']],
37
-    denormalizationContext: ['groups' => ['product_group:write']]
38
-)]
39
-#[ApiFilter(OrderFilter::class, properties: ['productGroup'])]
40
-#[ORM\Table(name: 'product_group')]
41
-#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupRepository::class)]
35
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
36
+    normalizationContext: [ 'groups' => [ 'product_group:read' ] ],
37
+    denormalizationContext: [ 'groups' => [ 'product_group:write' ] ]
38
+) ]
39
+#[ApiFilter(OrderFilter::class, properties: [ 'productGroup' ]) ]
40
+#[ORM\Table(name: 'product_group') ]
41
+#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupRepository::class) ]
42 42
 
43 43
 class ProductGroup
44 44
 {
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @Groups({"product_group:read","product_group:write","order_product:read"})
49 49
      */
50
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])]
51
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
52
-    #[ORM\Id]
53
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
50
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'id' => 'exact' ]) ]
51
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
52
+    #[ORM\Id ]
53
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
54 54
     private $id;
55 55
 
56 56
     /**
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
      *
59 59
      * @Groups({"product_group:read","product_group:write","order_product:read"})
60 60
      */
61
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['productGroup' => 'exact'])]
62
-    #[ORM\Column(name: 'product_group', type: 'string', length: 255, nullable: false)]
61
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productGroup' => 'exact' ]) ]
62
+    #[ORM\Column(name: 'product_group', type: 'string', length: 255, nullable: false) ]
63 63
 
64 64
     private $productGroup;
65 65
 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @Groups({"product_group:read","product_group:write","order_product:read"})
70 70
      */
71
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['priceCalculation' => 'exact'])]
72
-    #[ORM\Column(name: 'price_calculation', type: 'string', length: 0, nullable: false, options: ['default' => "'sum'"])]
71
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'priceCalculation' => 'exact' ]) ]
72
+    #[ORM\Column(name: 'price_calculation', type: 'string', length: 0, nullable: false, options: [ 'default' => "'sum'" ]) ]
73 73
 
74 74
     private $priceCalculation = 'sum';
75 75
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      *
79 79
      * @Groups({"product_group:read","product_group:write","order_product:read"})
80 80
      */
81
-    #[ORM\Column(name: 'required', type: 'boolean', nullable: false)]
81
+    #[ORM\Column(name: 'required', type: 'boolean', nullable: false) ]
82 82
     private $required = 0;
83 83
 
84 84
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      *
87 87
      * @Groups({"product_group:read","product_group:write","order_product:read"})
88 88
      */
89
-    #[ORM\Column(name: 'minimum', type: 'integer', nullable: true, options: ['default' => 'NULL'])]
89
+    #[ORM\Column(name: 'minimum', type: 'integer', nullable: true, options: [ 'default' => 'NULL' ]) ]
90 90
     private $minimum = NULL;
91 91
 
92 92
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      *
95 95
      * @Groups({"product_group:read","product_group:write","order_product:read"})
96 96
      */
97
-    #[ORM\Column(name: 'maximum', type: 'integer', nullable: true, options: ['default' => 'NULL'])]
97
+    #[ORM\Column(name: 'maximum', type: 'integer', nullable: true, options: [ 'default' => 'NULL' ]) ]
98 98
     private $maximum = NULL;
99 99
 
100 100
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      *
103 103
      * @Groups({"product_group:read","product_group:write","order_product:read"})
104 104
      */
105
-    #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: ['default' => '1'])]
105
+    #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: [ 'default' => '1' ]) ]
106 106
     private $active = true;
107 107
 
108 108
     /**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      *
111 111
      * @Groups({"product_group:read","product_group:write","order_product:read"})
112 112
      */
113
-    #[ORM\Column(name: 'group_order', type: 'integer', nullable: false)]
113
+    #[ORM\Column(name: 'group_order', type: 'integer', nullable: false) ]
114 114
     private $groupOrder = 0;
115 115
 
116 116
     /**
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
      *
119 119
      * @Groups({"product_group:write"})
120 120
      */
121
-    #[ORM\OneToMany(targetEntity: \ProductGroupProduct::class, mappedBy: 'productGroup', orphanRemoval: true)]
121
+    #[ORM\OneToMany(targetEntity: \ProductGroupProduct::class, mappedBy: 'productGroup', orphanRemoval: true) ]
122 122
     private $products;
123 123
 
124 124
     /**
125 125
      * @Groups({"product_group:read","product_group:write"})
126 126
      */
127
-    #[ApiFilter(filterClass: SearchFilter::class, properties: ['productParent' => 'exact'])]
128
-    #[ORM\JoinColumn(nullable: false)]
129
-    #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\Product::class)]
127
+    #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productParent' => 'exact' ]) ]
128
+    #[ORM\JoinColumn(nullable: false) ]
129
+    #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\Product::class) ]
130 130
 
131 131
     private $productParent;
132 132
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     public function addProduct(ProductGroupProduct $product): self
291 291
     {
292 292
         if (!$this->products->contains($product)) {
293
-            $this->products[] = $product;
293
+            $this->products[ ] = $product;
294 294
             $product->setProductGroup($this);
295 295
         }
296 296
 
Please login to merge, or discard this patch.
src/Entity/ProductUnity.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 use ApiPlatform\Metadata\ApiResource;
22 22
 
23 23
 /**
24
-  * ProductUnity
25
-  */
24
+ * ProductUnity
25
+ */
26 26
  #[ApiResource(
27 27
     operations: [
28 28
         new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'),
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
  #[ApiResource(
27 27
     operations: [
28 28
         new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'),
29
-        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['product_unity_edit']]),
29
+        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'product_unity_edit' ] ]),
30 30
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
31 31
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
32 32
         new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')')
33 33
     ],
34
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
35
-    normalizationContext: ['groups' => ['product_unity:read']],
36
-    denormalizationContext: ['groups' => ['product_unity:write']]
37
-)]
38
- #[ORM\Table(name: 'product_unity')]
39
- #[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductUnityRepository::class)]
34
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
35
+    normalizationContext: [ 'groups' => [ 'product_unity:read' ] ],
36
+    denormalizationContext: [ 'groups' => [ 'product_unity:write' ] ]
37
+) ]
38
+ #[ORM\Table(name: 'product_unity') ]
39
+ #[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductUnityRepository::class) ]
40 40
 class ProductUnity
41 41
 {
42 42
     /**
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @Groups({"product:read","product_group_product:read","product_group:read","product_unity:read"})
46 46
      */
47
-    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
48
-    #[ORM\Id]
49
-    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
47
+    #[ORM\Column(name: 'id', type: 'integer', nullable: false) ]
48
+    #[ORM\Id ]
49
+    #[ORM\GeneratedValue(strategy: 'IDENTITY') ]
50 50
     private $id;
51 51
 
52 52
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      *
55 55
      * @Groups({"product:read","product_group_product:read","product_group:read","product_unity:read"})
56 56
      */
57
-    #[ORM\Column(name: 'product_unit', type: 'string', length: 3, nullable: false)]
57
+    #[ORM\Column(name: 'product_unit', type: 'string', length: 3, nullable: false) ]
58 58
     private $productUnit;
59 59
 
60 60
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      *
63 63
      * @Groups({"product:read","product_group_product:read","product_group:read","product_unity:read"})
64 64
      */
65
-    #[ORM\Column(name: 'unit_type', type: 'string', length: 0, nullable: false, options: ['default' => "'I'", 'comment' => 'Integer, Fractioned'])]
65
+    #[ORM\Column(name: 'unit_type', type: 'string', length: 0, nullable: false, options: [ 'default' => "'I'", 'comment' => 'Integer, Fractioned' ]) ]
66 66
     private $unitType = 'I';
67 67
 
68 68
     /**
Please login to merge, or discard this patch.