phpunit-data-provider icon indicating copy to clipboard operation
phpunit-data-provider copied to clipboard

Improve the code quality with tools

Open oliverklee opened this issue 4 years ago • 4 comments

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 avatar Jun 04 '21 13:06 oliverklee

@oliverklee What do you think should be the next step?

danon avatar Aug 18 '21 13:08 danon

@Danon I'd like to have this PR next: https://github.com/T-Regx/CrossDataProviders/pull/24

oliverklee avatar Aug 18 '21 13:08 oliverklee

@oliverklee What do you think the next step should be?

danon avatar Dec 27 '21 19:12 danon

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).

oliverklee avatar Dec 27 '21 23:12 oliverklee