@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | throw new \RuntimeException('Wrong PickupPoint provided'); |
77 | 77 | } |
78 | 78 | } else { |
79 | - $deliveryServiceCode = in_array($receiver->getCountryCode(), ['LT', 'LV']) ? Service::COURIER_LT_LV() : Service::COURIER(); |
|
79 | + $deliveryServiceCode = in_array($receiver->getCountryCode(), [ 'LT', 'LV' ]) ? Service::COURIER_LT_LV() : Service::COURIER(); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | $writer->writeAttribute('service', $deliveryServiceCode->getValue()); |
@@ -277,18 +277,18 @@ discard block |
||
277 | 277 | { |
278 | 278 | $response = $this->getHttpClient()->request('GET', 'https://www.omniva.ee/locations.csv'); |
279 | 279 | |
280 | - $content = (string)$response->getBody(); |
|
280 | + $content = (string) $response->getBody(); |
|
281 | 281 | |
282 | - $pickupPoints = []; |
|
283 | - $file = fopen('php://temp','r+'); |
|
282 | + $pickupPoints = [ ]; |
|
283 | + $file = fopen('php://temp', 'r+'); |
|
284 | 284 | fwrite($file, $content); |
285 | 285 | rewind($file); //rewind to process CSV |
286 | 286 | while (($row = fgetcsv($file, 0, ';')) !== FALSE) { |
287 | - $pickupPoints[] = $row; |
|
287 | + $pickupPoints[ ] = $row; |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | // remove first item because it has only titles |
291 | - unset($pickupPoints[0]); |
|
291 | + unset($pickupPoints[ 0 ]); |
|
292 | 292 | |
293 | 293 | return $pickupPoints; |
294 | 294 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | public function setType(int $type): self |
30 | 30 | { |
31 | - if (!in_array($type, [self::TYPE_TERMINAL, self::TYPE_POST_OFFICE])) { |
|
31 | + if (!in_array($type, [ self::TYPE_TERMINAL, self::TYPE_POST_OFFICE ])) { |
|
32 | 32 | throw new \InvalidArgumentException('Unsupported type'); |
33 | 33 | } |
34 | 34 |