gd-75 / php-cs-fixer-enforce-double-quotes
A rule for PHP CS Fixer to enforce double quotes.
Installs: 25 408
Dependents: 2
Suggesters: 0
Security: 0
Stars: 5
Watchers: 0
Forks: 1
Open Issues: 0
Requires
- php: >=7.4
Requires (Dev)
README
php-cs-fixer-enforce-double-quotes
A rule for PHP CS Fixer to enforce double quotes.
Installation and usage
composer require --dev gd-75/php-cs-fixer-enforce-double-quotes
In your PHP CS Fixer configuration, add:
use GD75\DoubleQuoteFixer\DoubleQuoteFixer; use PhpCsFixer\Config; $config = new Config(); $config ->registerCustomFixers( [ new DoubleQuoteFixer() ] ) ->setRules( [ "GD75/double_quote_fixer" => true, ] );
Warning
Before auto-fixing quotes on your project, please run a dry-run with diffs to make sure the fixer works correctly.
Contributors
I'd like to thank the people who spend time to improve the project !
- Androl Genhald (tests & improvements on supported strings)
TO-DO
- Create a configuration for the allowance of single quoted strings when it contains a double quote