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

Reach PHPStan level 5 #40

Merged
merged 1 commit into from
Oct 9, 2023
Merged

Reach PHPStan level 5 #40

merged 1 commit into from
Oct 9, 2023

Conversation

k00ni
Copy link
Member

@k00ni k00ni commented Oct 6, 2023

With PHPStan level 5 we got the following:

   0. basic checks, unknown classes, unknown functions, unknown methods 
      called on $this, wrong number of arguments passed to those methods and functions, 
      always undefined variables
   1. possibly undefined variables, unknown magic methods and properties on classes with __call and __get
   2. unknown methods checked on all expressions (not just $this), validating PHPDocs
   3. return types, types assigned to properties
   4. basic dead code checking - always false instanceof and other type checks, 
      dead else branches, unreachable code after return; etc.
X  5. checking types of arguments passed to methods and functions

For more information: https://phpstan.org/user-guide/rule-levels

@k00ni k00ni added the enhancement New feature or request label Oct 6, 2023
@k00ni k00ni self-assigned this Oct 6, 2023
@k00ni k00ni merged commit 5ec1f58 into master Oct 9, 2023
@k00ni k00ni deleted the feature/phpstan-lvl-5 branch October 9, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant