Skip to content

Commit de75ab5

Browse files
authored
Fix update of phpstan (#81)
1 parent 7d8d3eb commit de75ab5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/PHPExif/Mapper/Exiftool.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ public function mapRawData(array $data): array
344344
$rotate = true;
345345
}
346346
}
347+
// @phpstan-ignore isset.offset (better safe than sorry, but this should never happen)
347348
if (!isset($value_split[0]) || !isset($value_split[1])) {
348349
continue 2;
349350
}
@@ -413,7 +414,11 @@ protected function extractGPSCoordinates(mixed $coordinates): float|false
413414
if (preg_match('!^([0-9.]+) deg ([0-9.]+)\' ([0-9.]+)"!', $coordinates, $matches) === 0) {
414415
return false;
415416
}
416-
if (!isset($matches[1]) || !isset($matches[2]) || !isset($matches[3])) {
417+
if (!isset($matches[1])
418+
// @phpstan-ignore isset.offset (better safe than sorry, but this should never happen)
419+
|| !isset($matches[2])
420+
// @phpstan-ignore isset.offset (better safe than sorry, but this should never happen)
421+
|| !isset($matches[3])) {
417422
return false;
418423
}
419424
return round(

0 commit comments

Comments
 (0)