Improve the code quality with tools
Let's improve code quality by checking the code with tools for common flaws and against established standards. This should also make contributing to this project easier, and reduce the amount of work required to do PR reviews.
I'll take care of this.
- [ ] add Composer script for PHP linting
- [x] make all PHP files strict
- [x] add PHP_CodeSniffer and Composer scripts for this
- [x] add PHP_CodeSniffer to the CI pipeline
- [x] enforce that all files are strict via PHP_CodeSniffer
- [x] autoformat all files with PhpStorm
- [x] make the code PSR-12-compliant
- [x] enforce PSR-12 in the CI pipeline
- [x] add PHPStan (including Composer scripts and checks in the CI pipeline)
- [x] fix all level-0 PHPStan-reported flaws
- [x] fix all level-1 PHPStan-reported flaws
- [x] fix all level-2 PHPStan-reported flaws
- [x] fix all level-3 PHPStan-reported flaws
- [x] fix all level-4 PHPStan-reported flaws
- [x] fix all level-5 PHPStan-reported flaws
- [ ] fix all level-6 PHPStan-reported flaws
- [ ] fix all level-7 PHPStan-reported flaws
- [ ] fix all level-8 PHPStan-reported flaws
- [ ] fix all level-9 PHPStan-reported flaws
@oliverklee What do you think should be the next step?
@Danon I'd like to have this PR next: https://github.com/T-Regx/CrossDataProviders/pull/24
@oliverklee What do you think the next step should be?
What do you think the next step should be?
Fix the level-6 warnings (i.e., make the array type annotations more specific), raise the level to 7, fix the level-7 warnings, raise the level etc.
During this process, we might also uncover bugs we'll need to fix (in addition to missing or incorrect type annotations).