H2-invent / open-datenschutzcenter

Open Source Datenschutzmanagement System
https://open-datenschutzcenter.de
GNU Affero General Public License v3.0
34 stars 10 forks source link

Add PHPStan and fix 61 errors #243

Closed Art4 closed 5 months ago

Art4 commented 7 months ago

This PR adds the static code analyzing tool PHPStan as a new dev dependencies and adds it as a new composer script. One can now use php composer.phar run phpstan to check for all PHPStan Level 0 error.

This PR also fixes all errors reported by PHPStan level 0.

Art4 commented 7 months ago

@holema @holzi1005 Are there any objections? Is there anything I should change or improve?

Art4 commented 6 months ago

I've merged the new changes from development branch and resolved the conflicts. I also fixed at least one more bug that was introduced in https://github.com/H2-invent/open-datenschutzcenter/pull/205/files#diff-bf8ba170825a0bac6af30c6b8c6f00482faa36c2805e70da6af2db252b158ee3L123-R125, but was reported by PHPStan.