@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | public function getIterator() |
47 | 47 | { |
48 | - return (function () { |
|
48 | + return (function() { |
|
49 | 49 | foreach ($this->getItems() as $item) { |
50 | 50 | yield $item; |
51 | 51 | } |
@@ -49,10 +49,10 @@ |
||
49 | 49 | 'trace' => 1, |
50 | 50 | 'classmap' => [ |
51 | 51 | // в wsdl-файле некоторые элементы называются не так, как в документации |
52 | - 'item' => Packet\Item::class, // Item → item |
|
53 | - 'error' => Packet\Error::class, // корневая ошибка |
|
54 | - 'Error' => Packet\Error::class, // ошибка конкретного РПО |
|
55 | - 'file' => Packet\ItemsWrapper::class, // value → file |
|
52 | + 'item' => Packet\Item::class, // Item → item |
|
53 | + 'error' => Packet\Error::class, // корневая ошибка |
|
54 | + 'Error' => Packet\Error::class, // ошибка конкретного РПО |
|
55 | + 'file' => Packet\ItemsWrapper::class, // value → file |
|
56 | 56 | 'operation' => Packet\TrackingEvent::class, // Operation → operation |
57 | 57 | |
58 | 58 | 'ticketResponse' => TicketResponse::class, |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function getIterator() |
32 | 32 | { |
33 | - return (function () { |
|
33 | + return (function() { |
|
34 | 34 | foreach ($this->getEvents() as $event) { |
35 | 35 | yield $event; |
36 | 36 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function getIterator() |
32 | 32 | { |
33 | - return (function () { |
|
33 | + return (function() { |
|
34 | 34 | foreach ($this->getEvents() as $event) { |
35 | 35 | yield $event; |
36 | 36 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function getIterator() |
32 | 32 | { |
33 | - return (function () { |
|
33 | + return (function() { |
|
34 | 34 | foreach ($this->getEvents() as $event) { |
35 | 35 | yield $event; |
36 | 36 | } |
@@ -155,6 +155,6 @@ |
||
155 | 155 | |
156 | 156 | public function isUnuseful(): bool |
157 | 157 | { |
158 | - return ! $this->isUseful(); |
|
158 | + return !$this->isUseful(); |
|
159 | 159 | } |
160 | 160 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $value = $value->getValue(); |
26 | 26 | } |
27 | 27 | |
28 | - if (! \in_array($value, static::toArray(), true)) { |
|
28 | + if (!\in_array($value, static::toArray(), true)) { |
|
29 | 29 | throw new \UnexpectedValueException("Value '$value' is not part of the enum ".static::class); |
30 | 30 | } |
31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | { |
37 | 37 | $class = static::class; |
38 | 38 | |
39 | - if (! isset(static::$cache[$class])) { |
|
39 | + if (!isset(static::$cache[$class])) { |
|
40 | 40 | static::$cache[$class] = (new \ReflectionClass($class))->getConstants(); |
41 | 41 | } |
42 | 42 |
@@ -143,7 +143,7 @@ |
||
143 | 143 | |
144 | 144 | private function serializeRequestData(array $data): array |
145 | 145 | { |
146 | - return \array_map(function ($value) { |
|
146 | + return \array_map(function($value) { |
|
147 | 147 | if (\is_object($value) && $value instanceof \JsonSerializable) { |
148 | 148 | return $value->jsonSerialize(); |
149 | 149 | } |
@@ -166,7 +166,7 @@ |
||
166 | 166 | private function convertAddress(Address $address): \Generator |
167 | 167 | { |
168 | 168 | foreach ($address->toArray() as $key => $value) { |
169 | - if ($key === 'index' && ! \preg_match(self::RUSSIAN_POSTAL_CODE, $value)) { |
|
169 | + if ($key === 'index' && !\preg_match(self::RUSSIAN_POSTAL_CODE, $value)) { |
|
170 | 170 | yield 'str-index-to' => $value; |
171 | 171 | } elseif ($key === 'mail-direct') { |
172 | 172 | yield $key => $value; |