feat: #3575442 Reintroduce PHPStan and fix phpstan errors

Closes #3575442

Merge request reports

Loading