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

Static analysis improvements #1475

Merged
merged 3 commits into from Jul 8, 2020

Conversation

gmponos
Copy link
Contributor

@gmponos gmponos commented Jun 14, 2020

Hi.. although you are not using static analysis these docblocks can improve static analysis on userland.

  • I used psalm-* in order for the normal annotations to not mess the IDEs
  • The psalm-* annotation works both for psalm and phpstan. I think that also psalm reads phpstan-* annotations.
  • Since you don't use static analysis I only changed the public api.

More things could be done. Like adding to levels something like this:

psalm-param 100|200|300|400|550|600|LogLevel::* $level

But it wont be 100% accurate since level can accept info and INFO and iNFO so I believe it's not worth the overhead.

src/Monolog/Logger.php Outdated Show resolved Hide resolved
@Seldaek Seldaek added this to the 2.x milestone Jul 8, 2020
@Seldaek Seldaek merged commit 53e2c97 into Seldaek:master Jul 8, 2020
@gmponos gmponos deleted the static-analysis-improvements branch July 8, 2020 19:57
@lyrixx lyrixx mentioned this pull request Aug 16, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants