Created by: dkarlovi
About
Purpose of this PR is to start fixing small and not so small issues found by PHPStan, after having applied CS Fixer 2.x.
hese templates are directly used in my specialization of OpenAPI generator, you can see a sample Reddit client. The purpose of the specialization is to iterate quickly, being able to collect many issues and fix them in bulk.
How to see the issues (required functional Docker):
Reported by Psalm:
git clone git@github.com:flexolabs/reddit-client.git
cd reddit-client/
make composer-install
make psalm
You can also run PHPStan, but need to change level
in phpstan.neon.dist
to:
level: max
and then run:
make phpstan
With everything enabled (strict rules, all other checks), this version of PHPStan finds 109 errors for me.
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
If contributing template-only or documentation-only changes which will change sample output, build the project beforehand. -
Run the shell script ./bin/generate-samples.sh
to update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
File the PR against the correct branch: master
-
Copy the technical committee to review the pull request if your PR is targeting a particular programming language.
@jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) heart, @ybelenko (2018/07), @renepardon (2018/12)