Test Setup Failed
Branch master (766dd7)
by Dima
04:18
created
Bundle/PricingBundle/EventListener/ProductPriceAttributesGridListener.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,8 +126,7 @@
 block discarded – undo
126 126
             $row = ['unit' => $unitCode];
127 127
             foreach ($currencies as $currency) {
128 128
                 $result = !empty($prices[$currency]) ?
129
-                    $prices[$currency]->getPrice()->getValue() :
130
-                    $this->translator->trans('oro.pricing.priceAttribute.withoutPrice');
129
+                    $prices[$currency]->getPrice()->getValue() : $this->translator->trans('oro.pricing.priceAttribute.withoutPrice');
131 130
 
132 131
                 $row[$currency] = $result;
133 132
             }
Please login to merge, or discard this patch.
src/Oro/Bundle/PricingBundle/EventListener/PriceListListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
         }
111 111
 
112 112
         $submitted = array_map(
113
-            function (PriceListSchedule $item) {
113
+            function(PriceListSchedule $item) {
114 114
                 return $item->getHash();
115 115
             },
116 116
             $priceList->getSchedules()->toArray()
Please login to merge, or discard this patch.
src/Oro/Bundle/PricingBundle/EventListener/ProductPriceDatagridListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@
 block discarded – undo
265 265
         /** @var ProductPriceRepository $priceRepository */
266 266
         $priceRepository = $this->doctrineHelper->getEntityRepository('OroPricingBundle:ProductPrice');
267 267
 
268
-        $productIds = array_map(function (ResultRecord $record) {
268
+        $productIds = array_map(function(ResultRecord $record) {
269 269
             return $record->getValue('id');
270 270
         }, $records);
271 271
 
Please login to merge, or discard this patch.
src/Oro/Bundle/PricingBundle/Builder/ProductPriceBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
         $rules = $priceList->getPriceRules()->toArray();
121 121
         usort(
122 122
             $rules,
123
-            function (PriceRule $a, PriceRule $b) {
123
+            function(PriceRule $a, PriceRule $b) {
124 124
                 if ($a->getPriority() === $b->getPriority()) {
125 125
                     return 0;
126 126
                 }
Please login to merge, or discard this patch.
Oro/Bundle/PricingBundle/Entity/Repository/BaseProductPriceRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -530,16 +530,16 @@
 block discarded – undo
530 530
             ->setParameter('priceList', $priceList);
531 531
         foreach ($criteria as $field => $criterion) {
532 532
             if ($criterion === null) {
533
-                $qb->andWhere($qb->expr()->isNull('prices.'.$field));
533
+                $qb->andWhere($qb->expr()->isNull('prices.' . $field));
534 534
             } elseif (is_array($criterion)) {
535
-                $qb->andWhere($qb->expr()->in('prices.'.$field, $criterion));
535
+                $qb->andWhere($qb->expr()->in('prices.' . $field, $criterion));
536 536
             } else {
537
-                $qb->andWhere($qb->expr()->eq('prices.'.$field, ':'.$field))
537
+                $qb->andWhere($qb->expr()->eq('prices.' . $field, ':' . $field))
538 538
                     ->setParameter($field, $criterion);
539 539
             }
540 540
         }
541 541
         foreach ($orderBy as $field => $order) {
542
-            $qb->addOrderBy('prices.'.$field, $order);
542
+            $qb->addOrderBy('prices.' . $field, $order);
543 543
         }
544 544
         if ($limit !== null) {
545 545
             $qb->setMaxResults($limit);
Please login to merge, or discard this patch.
src/Oro/Bundle/PricingBundle/Entity/Repository/ProductPriceRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $qb = $this->createQueryBuilder('price');
163 163
 
164 164
         // ensure all skus are strings to avoid postgres's "No operator matches the given name and argument type(s)."
165
-        array_walk($productSkus, function (& $sku) {
165
+        array_walk($productSkus, function(& $sku) {
166 166
             $sku = (string)$sku;
167 167
         });
168 168
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             $price->setId($id);
253 253
         }
254 254
         $qb
255
-            ->setParameter('price_rule_id', $price->getPriceRule() ? $price->getPriceRule()->getId(): null)
255
+            ->setParameter('price_rule_id', $price->getPriceRule() ? $price->getPriceRule()->getId() : null)
256 256
             ->setParameter('unit_code', $price->getProductUnitCode())
257 257
             ->setParameter('product_id', $price->getProduct()->getId())
258 258
             ->setParameter('price_list_id', $price->getPriceList()->getId())
Please login to merge, or discard this patch.
Oro/Bundle/PricingBundle/Migrations/Schema/OroPricingBundleInstaller.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -251,10 +251,10 @@
 block discarded – undo
251 251
         );
252 252
         $table->addIndex(
253 253
             ['combined_price_list_id',
254
-             'product_id',
255
-             'unit_code',
256
-             'quantity',
257
-             'currency'],
254
+                'product_id',
255
+                'unit_code',
256
+                'quantity',
257
+                'currency'],
258 258
             'oro_combined_price_idx'
259 259
         );
260 260
         $table->addIndex(
Please login to merge, or discard this patch.
PricingBundle/Tests/Unit/SubtotalProcessor/TotalProcessorProviderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
             ->method('round')
61 61
             ->will(
62 62
                 $this->returnCallback(
63
-                    function ($value) {
63
+                    function($value) {
64 64
                         return round($value, 0, PHP_ROUND_HALF_UP);
65 65
                     }
66 66
                 )
Please login to merge, or discard this patch.
Unit/SubtotalProcessor/Provider/LineItemNotPricedSubtotalProviderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             ->method('round')
66 66
             ->will(
67 67
                 $this->returnCallback(
68
-                    function ($value) {
68
+                    function($value) {
69 69
                         return round($value, 0, PHP_ROUND_HALF_UP);
70 70
                     }
71 71
                 )
Please login to merge, or discard this patch.