Test Setup Failed
Push — master ( 766dd7...5020a5 )
by
unknown
03:37
created
Datagrid/Extension/MassAction/AddProductsMassActionArgsParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         $productIds = [];
42 42
         if (!$this->isAllSelected() && array_key_exists('values', $this->args)) {
43 43
             $productIds = array_map(
44
-                function ($id) {
45
-                    return (int) $id;
44
+                function($id) {
45
+                    return (int)$id;
46 46
                 },
47 47
                 explode(',', $this->args['values'])
48 48
             );
@@ -68,6 +68,6 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function isAllSelected()
70 70
     {
71
-        return array_key_exists('inset', $this->args) && (int) $this->args['inset'] === 0;
71
+        return array_key_exists('inset', $this->args) && (int)$this->args['inset'] === 0;
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
src/Oro/Bundle/ShoppingListBundle/Manager/MatrixGridOrderManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     private function doSimpleProductSupportsUnitPrecision(Product $product, ProductUnitPrecision $unit)
166 166
     {
167 167
         $productUnits = $product->getUnitPrecisions()->map(
168
-            function (ProductUnitPrecision $unitPrecision) {
168
+            function(ProductUnitPrecision $unitPrecision) {
169 169
                 return $unitPrecision->getUnit();
170 170
             }
171 171
         );
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     if ($column->product) {
199 199
                         $lineItem = new LineItem();
200 200
                         $lineItem->setProduct($column->product);
201
-                        $lineItem->setQuantity((float) $column->quantity);
201
+                        $lineItem->setQuantity((float)$column->quantity);
202 202
                         $lineItem->setUnit($collection->unit);
203 203
 
204 204
                         if ($product->isConfigurable()) {
Please login to merge, or discard this patch.
src/Oro/Bundle/ShoppingListBundle/Manager/ShoppingListManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      */
178 178
     public function addLineItem(LineItem $lineItem, ShoppingList $shoppingList, $flush = true, $concatNotes = false)
179 179
     {
180
-        $func = function (LineItem $duplicate) use ($lineItem, $shoppingList, $concatNotes) {
180
+        $func = function(LineItem $duplicate) use ($lineItem, $shoppingList, $concatNotes) {
181 181
             $this->mergeLineItems($lineItem, $duplicate, $concatNotes);
182 182
         };
183 183
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public function updateLineItem(LineItem $lineItem, ShoppingList $shoppingList)
199 199
     {
200
-        $func = function (LineItem $duplicate) use ($lineItem, $shoppingList) {
200
+        $func = function(LineItem $duplicate) use ($lineItem, $shoppingList) {
201 201
             if ($lineItem->getQuantity() > 0) {
202 202
                 $this->updateLineItemQuantity($lineItem, $duplicate);
203 203
             } else {
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
             $shoppingList = $repository->findByUserAndId($this->aclHelper, $currentListId, $this->getWebsiteId());
407 407
         }
408 408
         if (!$shoppingList) {
409
-            $shoppingList  = $repository->findAvailableForCustomerUser($this->aclHelper, false, $this->getWebsiteId());
409
+            $shoppingList = $repository->findAvailableForCustomerUser($this->aclHelper, false, $this->getWebsiteId());
410 410
         }
411 411
         if ($create && !$shoppingList instanceof ShoppingList) {
412 412
             $label = $this->translator->trans($label ?: 'oro.shoppinglist.default.label');
Please login to merge, or discard this patch.
Oro/Bundle/ShoppingListBundle/Entity/Repository/ShoppingListRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,6 +132,6 @@
 block discarded – undo
132 132
             ->getQuery()
133 133
             ->getSingleScalarResult();
134 134
 
135
-        return (integer) $results;
135
+        return (integer)$results;
136 136
     }
137 137
 }
Please login to merge, or discard this patch.
src/Oro/Bundle/ShoppingListBundle/Entity/Repository/LineItemRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 ORDER BY li.shoppingList DESC, li.id DESC
147 147
 DQL;
148 148
         $shoppingListIds = array_map(
149
-            function (ShoppingList $shoppingList) {
149
+            function(ShoppingList $shoppingList) {
150 150
                 return $shoppingList->getId();
151 151
             },
152 152
             $shoppingLists
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $result = [];
163 163
 
164 164
         $productsIds = array_map(
165
-            function (LineItem $lineItem) {
165
+            function(LineItem $lineItem) {
166 166
                 return $lineItem->getProduct()->getId();
167 167
             },
168 168
             $lineItems
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             }
199 199
         }
200 200
 
201
-        $result = array_map(function (array $lineItemsByShoppingList) use ($productCount) {
201
+        $result = array_map(function(array $lineItemsByShoppingList) use ($productCount) {
202 202
             return array_slice($lineItemsByShoppingList, 0, $productCount);
203 203
         }, $result);
204 204
 
Please login to merge, or discard this patch.
Layout/DataProvider/FrontendShoppingListProductUnitsQuantityProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      */
65 65
     protected function setByProducts($products)
66 66
     {
67
-        $products = array_filter($products, function (Product $product) {
67
+        $products = array_filter($products, function(Product $product) {
68 68
             return !array_key_exists($product->getId(), $this->data);
69 69
         });
70 70
         if (!$products) {
Please login to merge, or discard this patch.
Tests/Unit/DataProvider/ProductShoppingListsDataProviderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
                         'is_current' => true,
147 147
                         'line_items' => [
148 148
                             ['id' => 1, 'unit' => 'code1', 'quantity' => 42],
149
-                            ['id' => 2,'unit' => 'code2', 'quantity' => 100],
149
+                            ['id' => 2, 'unit' => 'code2', 'quantity' => 100],
150 150
                         ]
151 151
                     ],
152 152
                     [
Please login to merge, or discard this patch.
ShoppingListBundle/Tests/Unit/Handler/ShoppingListLineItemHandlerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
         $this->shoppingListManager->expects($this->once())->method('bulkAddLineItems')->with(
240 240
             $this->callback(
241
-                function (array $lineItems) use ($expectedLineItems, $customerUser, $organization) {
241
+                function(array $lineItems) use ($expectedLineItems, $customerUser, $organization) {
242 242
                     /** @var LineItem $lineItem */
243 243
                     foreach ($lineItems as $key => $lineItem) {
244 244
                         /** @var LineItem $expectedLineItem */
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
         $productUnitRepository->expects($this->any())
367 367
             ->method('findOneBy')
368
-            ->willReturnCallback(function ($unit) {
368
+            ->willReturnCallback(function($unit) {
369 369
                 return $this->getEntity(ProductUnit::class, ['code' => $unit]);
370 370
             });
371 371
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 
384 384
         $em->expects($this->any())->method('getReference')->will(
385 385
             $this->returnCallback(
386
-                function ($className, $id) {
386
+                function($className, $id) {
387 387
                     return $this->getEntity($className, ['id' => $id]);
388 388
                 }
389 389
             )
Please login to merge, or discard this patch.
Unit/Datagrid/Extension/MassAction/AddProductsMassActionHandlerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
             ->with($shoppingList);
181 181
         $em->expects($this->once())
182 182
             ->method('flush')
183
-            ->willReturnCallback(function () use ($shoppingList) {
183
+            ->willReturnCallback(function() use ($shoppingList) {
184 184
                 $shoppingList->setId(5);
185 185
             });
186 186
 
Please login to merge, or discard this patch.