-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Make the code more robust using PHPStan #638
Comments
Hello @szepeviktor thanks for the issue, do you have specific parts to change and are you willing to create a Pull request with changes? |
Hello @tvbeek ! I think I have to dig deep to understand what causes a specific issue.
|
Let's start with level one and slowly go up. |
Here you are
I think the cause is namespace in PHPDoc types. |
The code causing the warnings has the form |
I think it should be |
Yeah you're right, the class name is not imported. I'd go for importing it rather than putting the FQN in the comments. |
The PR did not solve it as we do not import |
#640 gives me |
Looks like there has bene some regressions, there are now 61 errors reported for level 2. Once possible reason for this could be that PDepend now documents all it's type (it's been brought up to level 6) so the issues might have previously been obscured by mixed return values. In any case I setup CI action for keeping things inline: #1017 |
Try running @phpstan in CI
phpstan analyze --level=4 src/main/php/
- this could be a simple start.All the best to you!
The text was updated successfully, but these errors were encountered: