Address newly reported errors for PHPStan
While working on #3535621, PHPStan CI reported 51 project-wide errors that do not appear locally. CI uses PHPStan 2.2.5 with newer Drupal rules, while DDEV uses PHPStan 1.12.33 and `phpstan-drupal` 1.3.9. Align local tooling with CI, then address or baseline the newly reported errors so contributors can reproduce PHPStan failures before pushing.
issue