@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $types = [\PDO::PARAM_INT]; |
| 81 | 81 | if ($products) { |
| 82 | 82 | $parameters[] = array_map( |
| 83 | - function ($product) { |
|
| 83 | + function($product) { |
|
| 84 | 84 | return $product instanceof Product ? $product->getId() : $product; |
| 85 | 85 | }, |
| 86 | 86 | $products |
@@ -538,16 +538,16 @@ discard block |
||
| 538 | 538 | ->setParameter('priceList', $priceList); |
| 539 | 539 | foreach ($criteria as $field => $criterion) { |
| 540 | 540 | if ($criterion === null) { |
| 541 | - $qb->andWhere($qb->expr()->isNull('prices.'.$field)); |
|
| 541 | + $qb->andWhere($qb->expr()->isNull('prices.' . $field)); |
|
| 542 | 542 | } elseif (is_array($criterion)) { |
| 543 | - $qb->andWhere($qb->expr()->in('prices.'.$field, $criterion)); |
|
| 543 | + $qb->andWhere($qb->expr()->in('prices.' . $field, $criterion)); |
|
| 544 | 544 | } else { |
| 545 | - $qb->andWhere($qb->expr()->eq('prices.'.$field, ':'.$field)) |
|
| 545 | + $qb->andWhere($qb->expr()->eq('prices.' . $field, ':' . $field)) |
|
| 546 | 546 | ->setParameter($field, $criterion); |
| 547 | 547 | } |
| 548 | 548 | } |
| 549 | 549 | foreach ($orderBy as $field => $order) { |
| 550 | - $qb->addOrderBy('prices.'.$field, $order); |
|
| 550 | + $qb->addOrderBy('prices.' . $field, $order); |
|
| 551 | 551 | } |
| 552 | 552 | if ($limit !== null) { |
| 553 | 553 | $qb->setMaxResults($limit); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $types = [\PDO::PARAM_INT]; |
| 50 | 50 | if ($products) { |
| 51 | 51 | $parameters[] = array_map( |
| 52 | - function ($product) { |
|
| 52 | + function($product) { |
|
| 53 | 53 | return $product instanceof Product ? $product->getId() : $product; |
| 54 | 54 | }, |
| 55 | 55 | $products |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $qb = $this->createQueryBuilder('price'); |
| 170 | 170 | |
| 171 | 171 | // ensure all skus are strings to avoid postgres's "No operator matches the given name and argument type(s)." |
| 172 | - array_walk($productSkus, function (& $sku) { |
|
| 172 | + array_walk($productSkus, function(& $sku) { |
|
| 173 | 173 | $sku = (string)$sku; |
| 174 | 174 | }); |
| 175 | 175 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | $price->setId($id); |
| 260 | 260 | } |
| 261 | 261 | $qb |
| 262 | - ->setParameter('price_rule_id', $price->getPriceRule() ? $price->getPriceRule()->getId(): null) |
|
| 262 | + ->setParameter('price_rule_id', $price->getPriceRule() ? $price->getPriceRule()->getId() : null) |
|
| 263 | 263 | ->setParameter('unit_code', $price->getProductUnitCode()) |
| 264 | 264 | ->setParameter('product_id', $price->getProduct()->getId()) |
| 265 | 265 | ->setParameter('price_list_id', $price->getPriceList()->getId()) |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | $repository = $entityManager->getRepository(ShippingService::class); |
| 100 | 100 | |
| 101 | 101 | /** @var ShippingService $shippingService */ |
| 102 | - $shippingService = $repository->findOneBy(['description' => $description]); |
|
| 102 | + $shippingService = $repository->findOneBy(['description' => $description]); |
|
| 103 | 103 | |
| 104 | 104 | if (!$shippingService) { |
| 105 | 105 | throw new \InvalidArgumentException(sprintf('No shipping service "%s" found', $description)); |