shipmonk / phpstan-ignore-inliner
Inline your PHPStan error ignores into the source files via @phpstan-ignore comments.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Type:phpstan-extension
Requires
- php: ^8.1
- phpstan/phpstan: ^2
Requires (Dev)
- editorconfig-checker/editorconfig-checker: ^10.7.0
- ergebnis/composer-normalize: 2.47.0
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan-phpunit: ^2.0.6
- phpstan/phpstan-strict-rules: ^2.0.4
- phpunit/phpunit: ^10.5.46
- shipmonk/phpstan-rules: ^4.1.2
- slevomat/coding-standard: ^8.18.0
This package is auto-updated.
Last update: 2025-05-23 17:27:29 UTC
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
Contributing
- Check your code by
composer check
- Autofix coding-style by
composer fix:cs
- All functionality must be tested