phpstan friendly formatter
v1.2.0
Enhance your PHPStan experience with a formatter that brings your code to life!

Ever felt lost in a sea of file paths and line numbers? We've been there! That's why we created this formatter to:
composer require --dev yamadashy/phpstan-friendly-formatterphpstan.neon or phpstan.neon.dist:includes:
- ./vendor/yamadashy/phpstan-friendly-formatter/extension.neonerrorFormat parameter:parameters:
errorFormat: friendlyIf you want to make it simpler, setting scripts in composer.json as follows:
{
"scripts": {
"analyze": "phpstan analyze --error-format friendly"
}
}You can run a short command like this:
composer analyzeYou can customize in your phpstan.neon:
parameters:
friendly:
# default is 3
lineBefore: 3
lineAfter: 3
# default is null
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'lineBefore ... Number of lines to display before error linelineAfter ... Number of lines to display after error lineeditorUrl ... URL with placeholders like [table formatter config](URL for editor like table formatter)When you actually introduce it in GitHub Actions, it will be displayed as follows.
https://github.com/yamadashy/laravel-blade-minify-directive/actions/runs/4714024802/jobs/8360104870
Distributed under the MIT license.