Skip to content

Commit 9b57fff

Browse files
committed
Fix PHPStan error
1 parent d64d411 commit 9b57fff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Parser/Header.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public function harvestPaxData(string $paxData): void
5555
if ($record === '') {
5656
continue;
5757
}
58-
preg_match_all('/^(\d+) ([^=]+)=(.*)$/', $record, $matches);
59-
if (count($matches) !== 4) {
58+
$matchesFound = preg_match_all('/^(\d+) ([^=]+)=(.*)$/', $record, $matches);
59+
if (!$matchesFound) {
6060
throw new InvalidArchiveFormatException(
6161
sprintf('Invalid Pax header record format: %s', $record)
6262
);

0 commit comments

Comments
 (0)