|
@@ -97,7 +97,7 @@ discard block |
|
|
block discarded – undo |
|
97
|
97
|
$this->contents = substr_replace($this->contents, pack('L', $timestamp), $pos, 4); |
|
98
|
98
|
|
|
99
|
99
|
// skip timestamp, compressed file size and crc32 checksum |
|
100
|
|
- $pos += 3*4; |
|
|
100
|
+ $pos += 3 * 4; |
|
101
|
101
|
|
|
102
|
102
|
// update or skip file flags - see Bug #77022, use 0644 over 0666 |
|
103
|
103
|
$fileFlags = $this->readUint($pos, 4); |
|
@@ -140,7 +140,7 @@ discard block |
|
|
block discarded – undo |
|
140
|
140
|
); |
|
141
|
141
|
|
|
142
|
142
|
if (!isset($algos[$signatureAlgo])) { |
|
143
|
|
- throw new \UnexpectedValueException('Invalid hash algorithm given: '.$signatureAlgo.' expected one of Phar::MD5, Phar::SHA1, Phar::SHA256 or Phar::SHA512'); // @codeCoverageIgnore |
|
|
143
|
+ throw new \UnexpectedValueException('Invalid hash algorithm given: ' . $signatureAlgo . ' expected one of Phar::MD5, Phar::SHA1, Phar::SHA256 or Phar::SHA512'); // @codeCoverageIgnore |
|
144
|
144
|
} |
|
145
|
145
|
$algo = $algos[$signatureAlgo]; |
|
146
|
146
|
|
|
@@ -154,7 +154,7 @@ discard block |
|
|
block discarded – undo |
|
154
|
154
|
|
|
155
|
155
|
$this->contents = substr($this->contents, 0, $pos) . $signature; |
|
156
|
156
|
|
|
157
|
|
- return (bool) file_put_contents($path, $this->contents); |
|
|
157
|
+ return (bool)file_put_contents($path, $this->contents); |
|
158
|
158
|
} |
|
159
|
159
|
|
|
160
|
160
|
private function readUint($pos, $bytes) |
|
@@ -205,11 +205,11 @@ discard block |
|
|
block discarded – undo |
|
205
|
205
|
$pos += 4 + $filenameLength; |
|
206
|
206
|
|
|
207
|
207
|
// skip filesize and timestamp |
|
208
|
|
- $pos += 2*4; |
|
|
208
|
+ $pos += 2 * 4; |
|
209
|
209
|
|
|
210
|
210
|
$compressedSizes += $this->readUint($pos, 4); |
|
211
|
211
|
// skip compressed file size, crc32 checksum and file flags |
|
212
|
|
- $pos += 3*4; |
|
|
212
|
+ $pos += 3 * 4; |
|
213
|
213
|
|
|
214
|
214
|
$metadataLength = $this->readUint($pos, 4); |
|
215
|
215
|
$pos += 4 + $metadataLength; |