Level 88
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