yharahuts / space-inside-array-braces-fixer
Custom rule for php-cs-fixer to add spaces inside array braces
dev-master
2023-10-23 23:47 UTC
Requires
- php: >=8.0.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ~3.13
- phpunit/phpunit: ^9.5.10
- tareq1988/wp-php-cs-fixer: dev-master
- vimeo/psalm: 5.x-dev
This package is auto-updated.
Last update: 2024-09-24 02:13:51 UTC
README
What is this?
A fixer class for the php-cs-fixer to add spaces inside array (square) braces, like:
// before $array['foo'] = ['bar']; // after $array[ 'foo' ] = [ 'bar' ];
Usage
Require it via composer:
composer require --dev yharahuts/space-inside-array-braces-fixer
Then enable it in your .php-cs-fixer
config file:
// ... $config = new PhpCsFixer\Config(); return $config ->registerCustomFixers( [ new \Codestyle\Fixer\SpaceInsideArrayBracesFixer(), ] ) ->setRules( [ // ... 'Yharahuts/space_inside_array_braces' => true ] );