Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPStan: update to latest version #455

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion getid3/module.audio-video.quicktime.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion getid3/module.audio-video.riff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
parameters:
level: 4
paths:
- getid3
excludes_analyse:
polluteScopeWithLoopInitialAssignments: true
dynamicConstantNames:
Expand Down