Closed (fixed)
Project:
AI Metering
Version:
1.0.0-alpha1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
21 Jun 2026 at 20:01 UTC
Updated:
6 Jul 2026 at 04:10 UTC
Jump to comment: Most recent
#3605324 fixed the PHPStan config so the CI job now actually runs. It found 17
pre-existing level-6 violations: nullable return types on install hooks that never
return null, type mismatches in the Views filter plugins (getValueOptions,
getAvailableYears, getMonthOptions), and a handful of pedantic test assertions
(assertTrue(true), assertIsInt on a known int, etc.). Full list in the
phpstan-baseline.neon artifact on MR !16.
Fix the violations in source and test files:
ai_metering.install: narrow ?string to string on hook_update_9008/9010/9011.UsageModelFilter, UsageProviderFilter: match getValueOptions() return type to parent (array|null), remove redundant isset, drop unreachable code.UsagePeriodFilter: fix array key types on getAvailableYears() / getMonthOptions(); annotate $this->query as Sql so PHPStan resolves addWhere().MockObject&CacheBackendInterface; remove always-true assertions.None.
None.
None.
N/A
Comments
Comment #6
codeitwisely commented