@@ -30,7 +30,7 @@ |
||
30 | 30 | new Serializer\Naming\IdenticalPropertyNamingStrategy() |
31 | 31 | ) |
32 | 32 | ) |
33 | - ->setSerializationContextFactory(function () { |
|
33 | + ->setSerializationContextFactory(function() { |
|
34 | 34 | return SerializationContext::create() |
35 | 35 | ->setSerializeNull(true); |
36 | 36 | }) |
@@ -18,27 +18,27 @@ |
||
18 | 18 | |
19 | 19 | interface SpeedyInterface |
20 | 20 | { |
21 | - public function getContractClient(GetContractClientsRequest $req): string|object; |
|
21 | + public function getContractClient(GetContractClientsRequest $req): string | object; |
|
22 | 22 | |
23 | - public function findCountry(FindCountryRequest $req): string|object; |
|
23 | + public function findCountry(FindCountryRequest $req): string | object; |
|
24 | 24 | |
25 | - public function findState(FindStateRequest $req): string|object; |
|
25 | + public function findState(FindStateRequest $req): string | object; |
|
26 | 26 | |
27 | - public function findSite(FindSiteRequest $req): string|object; |
|
27 | + public function findSite(FindSiteRequest $req): string | object; |
|
28 | 28 | |
29 | - public function findOffice(FindOfficeRequest $req): string|object; |
|
29 | + public function findOffice(FindOfficeRequest $req): string | object; |
|
30 | 30 | |
31 | - public function findComplex(FindComplexRequest $req): string|object; |
|
31 | + public function findComplex(FindComplexRequest $req): string | object; |
|
32 | 32 | |
33 | - public function findStreet(FindStreetRequest $req): string|object; |
|
33 | + public function findStreet(FindStreetRequest $req): string | object; |
|
34 | 34 | |
35 | - public function createShipment(CreateShipmentRequest $req): string|object; |
|
35 | + public function createShipment(CreateShipmentRequest $req): string | object; |
|
36 | 36 | |
37 | - public function track(TrackRequest $object): string|object; |
|
37 | + public function track(TrackRequest $object): string | object; |
|
38 | 38 | |
39 | - public function calculate(CalculationRequest $object): string|object; |
|
39 | + public function calculate(CalculationRequest $object): string | object; |
|
40 | 40 | |
41 | - public function print(PrintRequest $object): string|object; |
|
41 | + public function print(PrintRequest $object): string | object; |
|
42 | 42 | |
43 | - public function destination(DestinationServicesRequest $object): string|object; |
|
43 | + public function destination(DestinationServicesRequest $object): string | object; |
|
44 | 44 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // @codeCoverageIgnoreStart |
4 | -if (! \function_exists('json_validate')) { |
|
4 | +if (!\function_exists('json_validate')) { |
|
5 | 5 | function json_validate(string $json, int $depth = 512, int $flags = 0): bool |
6 | 6 | { |
7 | 7 | if (0 !== $flags && \JSON_INVALID_UTF8_IGNORE !== $flags) { |
@@ -194,7 +194,7 @@ |
||
194 | 194 | 'service' => $this->service->toArray(), // ok |
195 | 195 | 'content' => $this->content->toArray(), // ok |
196 | 196 | 'payment' => $this->payment->toArray(), // ok |
197 | - 'sender' => $this->sender->toArray(), // ok |
|
197 | + 'sender' => $this->sender->toArray(), // ok |
|
198 | 198 | /* "sender" => [ |
199 | 199 | "phone1" => [ |
200 | 200 | "number" => "0888323020" |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | public function __construct(string $value) |
36 | 36 | { |
37 | - if (! $this->isValid($value)) { |
|
37 | + if (!$this->isValid($value)) { |
|
38 | 38 | throw new \InvalidArgumentException(); |
39 | 39 | } |
40 | 40 | $this->value = $value; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | private function isValid(string $value): bool |
44 | 44 | { |
45 | - if (! \in_array($value, self::OPTIONS, true)) { |
|
45 | + if (!\in_array($value, self::OPTIONS, true)) { |
|
46 | 46 | return false; |
47 | 47 | } |
48 | 48 | return true; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | int $pickupOfficeId = null, |
32 | 32 | CalculationAddressLocation $addressLocation = null |
33 | 33 | ) { |
34 | - $this->privatePerson = $privatePerson; |
|
34 | + $this->privatePerson = $privatePerson; |
|
35 | 35 | $this->pickupOfficeId = $pickupOfficeId; |
36 | 36 | $this->addressLocation = $addressLocation; |
37 | 37 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | /** |
57 | 57 | * @Serializer\Type("array") |
58 | 58 | */ |
59 | - private array|null $additionalInfo; |
|
59 | + private array | null $additionalInfo; |
|
60 | 60 | |
61 | 61 | public function __construct( |
62 | 62 | \DateTime $dateTime, |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | public function findCountryById(int $id): ?Country |
44 | 44 | { |
45 | - $collection = $this->getCountries()->filter(function (Country $country) use ($id) { |
|
45 | + $collection = $this->getCountries()->filter(function(Country $country) use ($id) { |
|
46 | 46 | return $country->getId() === $id; |
47 | 47 | }); |
48 | 48 | |
@@ -54,24 +54,24 @@ discard block |
||
54 | 54 | return $collection->first(); |
55 | 55 | } |
56 | 56 | |
57 | - public function findCountryByName(string $name): false|null|Country |
|
57 | + public function findCountryByName(string $name): false | null | Country |
|
58 | 58 | { |
59 | 59 | $name = \mb_strtoupper($name, 'UTF-8'); |
60 | 60 | |
61 | - $collection = $this->countries->filter(function (Country $country) use ($name) { |
|
61 | + $collection = $this->countries->filter(function(Country $country) use ($name) { |
|
62 | 62 | return $country->getName() === $name; |
63 | 63 | }); |
64 | 64 | |
65 | - return (! $collection->isEmpty()) ? $collection->first() : null; |
|
65 | + return (!$collection->isEmpty()) ? $collection->first() : null; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | |
69 | - public function findCountryByIsoAlpha2(string $isoAlpha2): false|null|Country |
|
69 | + public function findCountryByIsoAlpha2(string $isoAlpha2): false | null | Country |
|
70 | 70 | { |
71 | - $collection = $this->getCountries()->filter(function (Country $country) use ($isoAlpha2) { |
|
71 | + $collection = $this->getCountries()->filter(function(Country $country) use ($isoAlpha2) { |
|
72 | 72 | return $country->getIsoAlpha2() === $isoAlpha2; |
73 | 73 | }); |
74 | 74 | |
75 | - return (! $collection->isEmpty()) ? $collection->first() : null; |
|
75 | + return (!$collection->isEmpty()) ? $collection->first() : null; |
|
76 | 76 | } |
77 | 77 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | private function setValue(string $value): void |
30 | 30 | { |
31 | - if (! \filter_var($value, \FILTER_VALIDATE_EMAIL)) { |
|
31 | + if (!\filter_var($value, \FILTER_VALIDATE_EMAIL)) { |
|
32 | 32 | throw new \InvalidArgumentException(); |
33 | 33 | } |
34 | 34 | $this->value = $value; |