diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2e23db2a..1b974dd4 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -51,8 +51,8 @@ jobs: - uses: "shivammathur/setup-php@v2" with: php-version: "8.2" - tools: "phpstan:1.10.57" + tools: "phpstan:1.12.3" coverage: "none" - uses: "ramsey/composer-install@v3" - name: "Run PHPStan" - run: "phpstan analyse -c phpstan.neon -l 4 getid3" + run: "phpstan" diff --git a/getid3/module.audio-video.quicktime.php b/getid3/module.audio-video.quicktime.php index d52e85fd..9b1cfb38 100644 --- a/getid3/module.audio-video.quicktime.php +++ b/getid3/module.audio-video.quicktime.php @@ -1650,7 +1650,7 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset @list($all, $latitude, $longitude, $altitude) = $matches; $info['quicktime']['comments']['gps_latitude'][] = floatval($latitude); $info['quicktime']['comments']['gps_longitude'][] = floatval($longitude); - if (!empty($altitude)) { + if (!empty($altitude)) { // @phpstan-ignore-line $info['quicktime']['comments']['gps_altitude'][] = floatval($altitude); } } else { diff --git a/getid3/module.audio-video.riff.php b/getid3/module.audio-video.riff.php index 3ea1bacf..59ed5819 100644 --- a/getid3/module.audio-video.riff.php +++ b/getid3/module.audio-video.riff.php @@ -98,7 +98,7 @@ public function Analyze() { $info['avdataend'] = $info['filesize']; } - $nextRIFFoffset = $Original['avdataoffset'] + 8 + $thisfile_riff['header_size']; // 8 = "RIFF" + 32-bit offset + $nextRIFFoffset = (int) $Original['avdataoffset'] + 8 + (int) $thisfile_riff['header_size']; // 8 = "RIFF" + 32-bit offset while ($nextRIFFoffset < min($info['filesize'], $info['avdataend'])) { try { $this->fseek($nextRIFFoffset); diff --git a/phpstan.neon b/phpstan.neon index 94321ef7..1fbce308 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,7 @@ parameters: + level: 4 + paths: + - getid3 excludes_analyse: polluteScopeWithLoopInitialAssignments: true dynamicConstantNames: