shipmonk/phpstan-ignore-inliner
最新稳定版本:1.0.0
Composer 安装命令:
composer require --dev shipmonk/phpstan-ignore-inliner
包简介
Inline your PHPStan error ignores into the source files via @phpstan-ignore comments.
README 文档
README
Allows you to easily inline ignore your PHPStan errors via @phpstan-ignore comment.
So instead of:
parameters: ignoreErrors: - message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#' identifier: empty.notAllowed path: ../src/App/User.php count: 1
You will have the ignored error directly in the source code src/App/User.php:
class User { public function updateSurname(string $surname): void { if (empty($surname)) { // @phpstan-ignore empty.notAllowed throw new EmptyNameException(); } } }
Installation:
composer require --dev shipmonk/phpstan-ignore-inliner
Usage
vendor/bin/phpstan --error-format=json | vendor/bin/inline-phpstan-ignores
Cli options
--comment: Adds a comment to all inlined ignores, resulting in// @phpstan-ignore empty.notAllowed (the comment)
Contributing
- Check your code by
composer check - Autofix coding-style by
composer fix:cs - All functionality must be tested
统计信息
- 总下载量: 4.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-20