2) PHPStan hook runs when your editor stops, catches issues, and fixes them automatically.
When your editor stops, the PHPStan hook kicks in - it analyzes your code, catches type errors, undefined variables, and logic issues, then auto-fixes what it can.