Next, we will work on another Code quality tool - Larastan.
Why Larastan is Needed?
At first glance, it does the same job as our IDE - it shows errors and warnings in the code. But Larastan is more than that.
The idea behind Larastan is to catch errors that are not visible in the code but can happen during runtime (e.g., calling a method on a non-existing model attribute).
On top of that, it also checks for compatibility issues. For example, if you have a method that should return a string, but you return an integer, Larastan will catch that.
Installing Larastan
First, we create a GitHub issue to install Larastan:
Then, we create a new branch:
git checkout -b feature/larastan
Now we can install Larastan, we run the composer command:
composer require --dev "larastan/larastan:^3.0"
Then, we need to create a configuration file for...