Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the code quality with tools #31

Open
14 of 19 tasks
oliverklee opened this issue Jun 4, 2021 · 4 comments
Open
14 of 19 tasks

Improve the code quality with tools #31

oliverklee opened this issue Jun 4, 2021 · 4 comments
Assignees

Comments

@oliverklee
Copy link
Collaborator

oliverklee commented Jun 4, 2021

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
  • make all PHP files strict
  • add PHP_CodeSniffer and Composer scripts for this
  • add PHP_CodeSniffer to the CI pipeline
  • enforce that all files are strict via PHP_CodeSniffer
  • autoformat all files with PhpStorm
  • make the code PSR-12-compliant
  • enforce PSR-12 in the CI pipeline
  • add PHPStan (including Composer scripts and checks in the CI pipeline)
  • fix all level-0 PHPStan-reported flaws
  • fix all level-1 PHPStan-reported flaws
  • fix all level-2 PHPStan-reported flaws
  • fix all level-3 PHPStan-reported flaws
  • fix all level-4 PHPStan-reported flaws
  • 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
@danon
Copy link
Member

danon commented Aug 18, 2021

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

@oliverklee
Copy link
Collaborator Author

@danon I'd like to have this PR next: #24

@danon
Copy link
Member

danon commented Dec 27, 2021

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

@oliverklee
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants