romanferens996's avatar

PHP Laravel code static analysis tool

Hi community!

Could you share your opportunity with code static analysis tools? Pros and cons

0 likes
1 reply
bobbybouwmann's avatar

Here you go:

Pros

  • Check your code without actually running it
  • Fewer bugs in your code, because the type is already checked
  • Makes it easier to keep the same code style in a team of developers
  • PHPStan or Larastan are very well developed and give a lot of good support so far

Cons

  • You get a lot of warnings that are not actual errors but have something to do with configuration or the limitations of the static analysis tool
  • You need to run the static analysis tool on every change of the codebase (every pull request), it might get slow
2 likes

Please or to participate in this conversation.