Skip to content

Commit bf20e35

Browse files
committed
Use \n instead of PHP_EOL
1 parent b16b6e5 commit bf20e35

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Parser/Header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(string $content)
5050

5151
public function harvestPaxData(string $paxData): void
5252
{
53-
foreach (explode(PHP_EOL, $paxData) as $record) {
53+
foreach (explode("\n", $paxData) as $record) {
5454
if ($record === '') {
5555
continue;
5656
}

tests/Parser/PaxHeaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ protected function generateSingleFile(?int $chunkSize = null, ?int $totalSize =
3030

3131
if ($totalSize > self::MAX_USTAR_SIZE) {
3232
// Generate a pax header and data record for a file larger than 8GB
33-
$data = implode(PHP_EOL, [
33+
$data = implode("\n", [
3434
implode(' ', array_reverse([$data = 'size=' . $totalSize, strlen($data)])),
35-
]) . PHP_EOL;
35+
]) . "\n";
3636

3737
yield str_pad(implode('', [
3838
/* 0 */ 'name' => str_pad('massive_file.txt', 100, "\0"),

0 commit comments

Comments
 (0)