← All changes
|
includes/sdk/s3/Aws/Api/Parser/DecodingEventStreamIterator.php
+6
-4
1.2.13
→
1.4.1
View file →
| @@ -127,8 +127,11 @@ | ||
| 127 | 127 | public function key() |
| 128 | 128 | { |
| 129 | 129 | return $this->key; |
| 130 | 130 | } |
| 131 | + /** | |
| 132 | + * @return void | |
| 133 | + */ | |
| 131 | 134 | #[\ReturnTypeWillChange] |
| 132 | 135 | public function next() |
| 133 | 136 | { |
| 134 | 137 | $this->currentPosition = $this->stream->tell(); |
| @@ -136,8 +139,11 @@ | ||
| 136 | 139 | $this->key++; |
| 137 | 140 | $this->currentEvent = $this->parseEvent(); |
| 138 | 141 | } |
| 139 | 142 | } |
| 143 | + /** | |
| 144 | + * @return void | |
| 145 | + */ | |
| 140 | 146 | #[\ReturnTypeWillChange] |
| 141 | 147 | public function rewind() |
| 142 | 148 | { |
| 143 | 149 | $this->stream->rewind(); |
| @@ -213,12 +219,8 @@ | ||
| 213 | 219 | return [$this->unpackInt64($this->readAndHashBytes(8))[1], 8]; |
| 214 | 220 | } |
| 215 | 221 | private function unpackInt64($bytes) |
| 216 | 222 | { |
| 217 | - if (\version_compare(\PHP_VERSION, '5.6.3', '<')) { | |
| 218 | - $d = \unpack('N2', $bytes); | |
| 219 | - return [1 => $d[1] << 32 | $d[2]]; | |
| 220 | - } | |
| 221 | 223 | return \unpack('J', $bytes); |
| 222 | 224 | } |
| 223 | 225 | private function decodeBytes($lengthBytes = 2) |
| 224 | 226 | { |