Skip to content

Fix the phpstan errors on master - #606

Merged
nemiah merged 1 commit into
nemiah:masterfrom
fds2610:phpstan-master-fixes
Nov 2, 2026
Merged

nemiah merged 1 commit into
nemiah:masterfrom
fds2610:phpstan-master-fixes

Conversation

@fds2610

@fds2610 fds2610 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

The PHPStan job fails on master with 19 errors. The baseline of #603 was generated on 10.10., before #592, #594, #598 and #601 were merged on 29.10., so it neither covers the new code nor knows that #601 already fixed two baselined CAMT errors.

This PR fixes them in the code instead of growing the baseline:

  • Return types for the new test methods (GetSEPAAccountsTest, HIUPDTest, HKWPDTest) and HKWPDv6::setPaginationToken().
  • Array value types for GetSEPAAccounts::__serialize()/__unserialize() and the data provider in CAMTStructuredFieldsTest.
  • GetSEPAAccountsTest builds the UPD from HIUPDv6 segments, as UPD::$hiupd expects HIUPD.
  • HIUPDTest converts its HBCI 2.2 examples in a small typed helper (self:: instead of static::). This also clears the six baselined parse() errors, so that entry is removed.
  • The two CAMT baseline entries made obsolete by fix: Improve regex to extract unstructured fields #601 are removed.

No functional change. PHPStan reports 0 errors, PHPUnit 205 tests green, php-cs-fixer clean.

Note for #605: it removes a different baseline entry (MT535), both PRs touch separate blocks of phpstan-baseline.neon.

This is (partly) generated code and I as human vouch for it's correctness.
I am using this code in my own repo. If something breaks, i'll fix it. Greets, Felix

The baseline of nemiah#603 was generated before nemiah#594, nemiah#598 and nemiah#601 were merged,
so master reports 19 errors. They are fixed in the code instead of being
added to the baseline:

- Return types for the new test methods and HKWPDv6::setPaginationToken().
- Array value types for GetSEPAAccounts::__serialize()/__unserialize() and
  the CAMT data provider.
- GetSEPAAccountsTest builds the UPD from HIUPDv6 segments, as UPD::$hiupd
  expects.
- HIUPDTest converts its examples in a typed helper (self:: instead of
  static::), which also clears the six baselined parse() errors.
- Drop the two CAMT baseline entries that nemiah#601 made obsolete.
@nemiah
nemiah merged commit 6c6404d into nemiah:master Nov 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants