-
Notifications
You must be signed in to change notification settings - Fork 54
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
Added PHPStan and script to run "composer phpstan" #48
Conversation
composer phpstan
composer.json
Outdated
}, | ||
"scripts": { | ||
"phpstan": [ | ||
"./vendor/bin/phpstan analyse --level 5 src" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@holtkamp Why do we go exactly for level 5
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no particular reason... as a bank you guys should probably "strive" for level 7 😄
https://github.com/phpstan/phpstan#rule-levels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@holtkamp what is the highest level the SDK is passing at the moment?
Levels:
Enjoy the ride! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge :)
?? the purpose of a static analysis tool is not to reduce the level to pass the checks, but to fix the code... |
@holtkamp you're absolutely right. However, even though the code is not passing much, we are not merging anything broken. Now, we can increase the level. A PR increasing the level would include both the level number increase and the fixes required for the checks of the level to pass :). |
As suggested here: #28 (comment)