Passed
Push — master ( 7ef6b6...fe0607 )
by Luiz Kim
01:57
created
src/Entity/ProductUnity.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@
 block discarded – undo
29 29
  #[ApiResource(
30 30
     operations: [
31 31
         new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'),
32
-        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['product_unity_edit']]),
32
+        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'product_unity_edit' ] ]),
33 33
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
34 34
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
35 35
         new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')')
36 36
     ],
37
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
38
-    normalizationContext: ['groups' => ['product_unity_read']],
39
-    denormalizationContext: ['groups' => ['product_unity_write']]
40
-)]
37
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
38
+    normalizationContext: [ 'groups' => [ 'product_unity_read' ] ],
39
+    denormalizationContext: [ 'groups' => [ 'product_unity_write' ] ]
40
+) ]
41 41
 class ProductUnity
42 42
 {
43 43
     /**
Please login to merge, or discard this patch.
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,6 @@  discard block
 block discarded – undo
47 47
      * @ORM\Id
48 48
      * @ORM\GeneratedValue(strategy="IDENTITY")
49 49
      * @Groups({"pruduct_read","product_unity_read"})
50
-
51 50
      */
52 51
     private $id;
53 52
 
@@ -56,7 +55,6 @@  discard block
 block discarded – undo
56 55
      *
57 56
      * @ORM\Column(name="product_unit", type="string", length=3, nullable=false)
58 57
      * @Groups({"pruduct_read","product_unity_read"})
59
-
60 58
      */
61 59
     private $productUnit;
62 60
 
Please login to merge, or discard this patch.
src/Entity/Product.php 2 patches
Indentation   -8 removed lines patch added patch discarded remove patch
@@ -52,7 +52,6 @@  discard block
 block discarded – undo
52 52
      * @ORM\Id
53 53
      * @ORM\GeneratedValue(strategy="IDENTITY")
54 54
      * @Groups({"product_read"})
55
-
56 55
      */
57 56
     private $id;
58 57
 
@@ -69,7 +68,6 @@  discard block
 block discarded – undo
69 68
      *
70 69
      * @ORM\Column(name="sku", type="string", length=32, nullable=true, options={"default"="NULL"})
71 70
      * @Groups({"product_read","order_product_read","order_read","product_write"})
72
-
73 71
      */
74 72
     private $sku = NULL;
75 73
 
@@ -78,7 +76,6 @@  discard block
 block discarded – undo
78 76
      *
79 77
      * @ORM\Column(name="type", type="string", length=0, nullable=false, options={"default"="'product'"})
80 78
      * @Groups({"product_read","order_product_read","order_read","product_write"})
81
-
82 79
      */
83 80
     private $type = 'product';
84 81
 
@@ -87,7 +84,6 @@  discard block
 block discarded – undo
87 84
      *
88 85
      * @ORM\Column(name="price", type="float", precision=10, scale=0, nullable=false)
89 86
      * @Groups({"product_read","order_product_read","order_read","product_write"})
90
-
91 87
      */
92 88
     private $price = 0;
93 89
 
@@ -96,7 +92,6 @@  discard block
 block discarded – undo
96 92
      *
97 93
      * @ORM\Column(name="product_condition", type="string", length=0, nullable=false, options={"default"="'new'"})
98 94
      * @Groups({"product_read","order_product_read","order_read","product_write"})
99
-
100 95
      */
101 96
     private $productCondition = 'new';
102 97
 
@@ -106,7 +101,6 @@  discard block
 block discarded – undo
106 101
      *
107 102
      * @ORM\Column(name="description", type="string", length=0, nullable=false)
108 103
      * @Groups({"product_read","order_product_read","order_read","product_write"})
109
-
110 104
      */
111 105
     private $description = '';
112 106
 
@@ -115,7 +109,6 @@  discard block
 block discarded – undo
115 109
      *
116 110
      * @ORM\Column(name="active", type="boolean", nullable=false, options={"default"="1"})
117 111
      * @Groups({"product_read","order_product_read","order_read","product_write"})
118
-
119 112
      */
120 113
     private $active = true;
121 114
 
@@ -127,7 +120,6 @@  discard block
 block discarded – undo
127 120
      *   @ORM\JoinColumn(name="company_id", referencedColumnName="id")
128 121
      * })
129 122
      * @Groups({"product_read","order_product_read","order_read","product_write"})
130
-
131 123
      */
132 124
     private $company;
133 125
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@
 block discarded – undo
32 32
 #[ApiResource(
33 33
     operations: [
34 34
         new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'),
35
-        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['product_write']]),
35
+        new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'product_write' ] ]),
36 36
         new Delete(security: 'is_granted(\'ROLE_CLIENT\')'),
37 37
         new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'),
38 38
         new GetCollection(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')')
39 39
     ],
40
-    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']],
41
-    normalizationContext: ['groups' => ['product_read']],
42
-    denormalizationContext: ['groups' => ['product_write']]
43
-)]
40
+    formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ],
41
+    normalizationContext: [ 'groups' => [ 'product_read' ] ],
42
+    denormalizationContext: [ 'groups' => [ 'product_write' ] ]
43
+) ]
44 44
 
45 45
 
46 46
 class Product
Please login to merge, or discard this patch.