@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | return $this->createQueryBuilder('o') |
| 21 | 21 | ->andWhere('o.city LIKE :city') |
| 22 | - ->setParameter('city', '%' . $cityName . '%') |
|
| 22 | + ->setParameter('city', '%'.$cityName.'%') |
|
| 23 | 23 | ->getQuery() |
| 24 | 24 | ->getResult() |
| 25 | 25 | ; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | ->leftJoin(Province::class, 'p', 'WITH', 'p.code = o.provinceCode') |
| 35 | 35 | ->where('o.provinceName LIKE :province') |
| 36 | 36 | ->orWhere('p.name LIKE :province') |
| 37 | - ->setParameter('province', '%' . $provinceName . '%') |
|
| 37 | + ->setParameter('province', '%'.$provinceName.'%') |
|
| 38 | 38 | ->getQuery() |
| 39 | 39 | ->getResult() |
| 40 | 40 | ; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | return $this->createQueryBuilder('o') |
| 49 | 49 | ->andWhere('o.postcode LIKE :postcode') |
| 50 | - ->setParameter('postcode', '%' . $postcode . '%') |
|
| 50 | + ->setParameter('postcode', '%'.$postcode.'%') |
|
| 51 | 51 | ->getQuery() |
| 52 | 52 | ->getResult() |
| 53 | 53 | ; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | /** @var DateTime $startDateTime */ |
| 130 | 130 | $startDateTime = $configuration['timePeriod']['start']; |
| 131 | 131 | /** @var DateTime $endDateTime */ |
| 132 | - $endDateTime = $configuration['timePeriod']['end']?:new DateTime(); |
|
| 132 | + $endDateTime = $configuration['timePeriod']['end'] ?: new DateTime(); |
|
| 133 | 133 | |
| 134 | 134 | if ($groupByParts[0] && $groupByParts[1]) { |
| 135 | 135 | $this->qb |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | ->setParameter('from', $startDateTime->format('Y-m-d H:i:s')) |
| 140 | 140 | ->setParameter('to', $endDateTime->format('Y-m-d H:i:s')) |
| 141 | 141 | ->groupBy($groupByParts[1]) |
| 142 | - ->orderBy('date,' . $groupByParts[1]) |
|
| 142 | + ->orderBy('date,'.$groupByParts[1]) |
|
| 143 | 143 | ; |
| 144 | 144 | } else { |
| 145 | 145 | $this->qb |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $type = 'user'.ucfirst($addressType).'Province'; |
| 246 | 246 | |
| 247 | 247 | if (isset($configuration[$type]) && count($configuration[$type]) > 0) { |
| 248 | - $provinces = $configuration[$type]->map(function (AddressInterface $address) { |
|
| 248 | + $provinces = $configuration[$type]->map(function(AddressInterface $address) { |
|
| 249 | 249 | return $address->getProvinceCode() ?: $address->getProvinceName(); |
| 250 | 250 | })->toArray(); |
| 251 | 251 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $type = 'user'.ucfirst($addressType).'City'; |
| 280 | 280 | |
| 281 | 281 | if (isset($configuration[$type]) && count($configuration[$type]) > 0) { |
| 282 | - $cities = $configuration[$type]->map(function (AddressInterface $address) { |
|
| 282 | + $cities = $configuration[$type]->map(function(AddressInterface $address) { |
|
| 283 | 283 | return $address->getCity(); |
| 284 | 284 | })->toArray(); |
| 285 | 285 | |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $type = 'user'.ucfirst($addressType).'Postcode'; |
| 311 | 311 | |
| 312 | 312 | if (isset($configuration[$type]) && count($configuration[$type]) > 0) { |
| 313 | - $codes = $configuration[$type]->map(function (AddressInterface $address) { |
|
| 313 | + $codes = $configuration[$type]->map(function(AddressInterface $address) { |
|
| 314 | 314 | return $address->getPostcode(); |
| 315 | 315 | })->toArray(); |
| 316 | 316 | |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | public function addProduct(array $configuration = [], string $field = 'p.id'): void |
| 339 | 339 | { |
| 340 | 340 | if (isset($configuration['product']) && count($configuration['product']) > 0) { |
| 341 | - $products = $configuration['product']->map(function (ProductInterface $product) { |
|
| 341 | + $products = $configuration['product']->map(function(ProductInterface $product) { |
|
| 342 | 342 | return $product->getId(); |
| 343 | 343 | })->toArray(); |
| 344 | 344 | |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | |
| 130 | 130 | private function getViewComparingCallback(View $expectedView) |
| 131 | 131 | { |
| 132 | - return function ($value) use ($expectedView) { |
|
| 132 | + return function($value) use ($expectedView) { |
|
| 133 | 133 | if (!$value instanceof View) { |
| 134 | 134 | return false; |
| 135 | 135 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $this->eventDispatcher->dispatch(ResourceActions::SHOW, $configuration, $report); |
| 44 | 44 | |
| 45 | 45 | if ($configuration->isHtmlRequest()) { |
| 46 | - return $this->render($configuration->getTemplate(ResourceActions::SHOW . '.html'), [ |
|
| 46 | + return $this->render($configuration->getTemplate(ResourceActions::SHOW.'.html'), [ |
|
| 47 | 47 | 'configuration' => $configuration, |
| 48 | 48 | 'metadata' => $this->metadata, |
| 49 | 49 | 'resource' => $report, |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | $labels = []; |
| 96 | 96 | foreach ($labelsAux as $label) { |
| 97 | 97 | if (!in_array($label, ['MonthDate', 'YearDate', 'DateDate'], true)) { |
| 98 | - $labels[] = preg_replace('/(?!^)[A-Z]{2,}(?=[A-Z][a-z])|[A-Z][a-z]/', ' $0', (string)$label); |
|
| 98 | + $labels[] = preg_replace('/(?!^)[A-Z]{2,}(?=[A-Z][a-z])|[A-Z][a-z]/', ' $0', (string) $label); |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | $data->setLabels($labels); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $countryName = $country !== null ? $country->getName() : $address->getCountryCode(); |
| 61 | 61 | |
| 62 | 62 | $cityLabel = ucfirst(strtolower($address->getCity() ?? '')).', '.$countryName; |
| 63 | - $isNew = count(array_filter($addresses, function ($address) use ($cityLabel): bool { |
|
| 63 | + $isNew = count(array_filter($addresses, function($address) use ($cityLabel): bool { |
|
| 64 | 64 | return $address['city'] === $cityLabel; |
| 65 | 65 | })) === 0; |
| 66 | 66 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | /** @var ProductInterface $product */ |
| 55 | 55 | foreach ($searchProducts as $product) { |
| 56 | 56 | $productLabel = ucfirst(strtolower($product->getName() ?? '')); |
| 57 | - $isNew = count(array_filter($products, function ($product) use ($productLabel): bool { |
|
| 57 | + $isNew = count(array_filter($products, function($product) use ($productLabel): bool { |
|
| 58 | 58 | return $product['name'] === $productLabel; |
| 59 | 59 | })) === 0; |
| 60 | 60 | |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | $provinceName = $this->getProvinceName($address); |
| 68 | 68 | $provinceLabel = ucfirst(strtolower($provinceName ?? '')).', '.$countryName; |
| 69 | - $isNew = count(array_filter($addresses, function ($address) use ($provinceLabel): bool { |
|
| 69 | + $isNew = count(array_filter($addresses, function($address) use ($provinceLabel): bool { |
|
| 70 | 70 | return $address['province'] === $provinceLabel; |
| 71 | 71 | })) === 0; |
| 72 | 72 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $countryName = $country !== null ? $country->getName() : $address->getCountryCode(); |
| 61 | 61 | |
| 62 | 62 | $postcodeLabel = $address->getPostcode().', '.$countryName; |
| 63 | - $isNew = count(array_filter($addresses, function ($address) use ($postcodeLabel): bool { |
|
| 63 | + $isNew = count(array_filter($addresses, function($address) use ($postcodeLabel): bool { |
|
| 64 | 64 | return $address['postcode'] === $postcodeLabel; |
| 65 | 65 | })) === 0; |
| 66 | 66 | |