PHPackages                             yharahuts/space-inside-array-braces-fixer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yharahuts/space-inside-array-braces-fixer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yharahuts/space-inside-array-braces-fixer
=========================================

Custom rule for php-cs-fixer to add spaces inside array braces

04.3k—7.1%1PHP

Since Oct 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yharahuts/space-inside-array-braces-fixer)[ Packagist](https://packagist.org/packages/yharahuts/space-inside-array-braces-fixer)[ RSS](/packages/yharahuts-space-inside-array-braces-fixer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

### What is this?

[](#what-is-this)

A fixer class for the [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)to add spaces inside array (square) braces, like:

```
// before
$array['foo'] = ['bar'];

// after
$array[ 'foo' ] = [ 'bar' ];
```

Usage
-----

[](#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
    ] );
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b426ac3de4f411162c5fed7ed234c532ff349c9e339cecc16bf9ce4ca67f3e4?d=identicon)[yharahuts](/maintainers/yharahuts)

---

Top Contributors

[![yharahuts](https://avatars.githubusercontent.com/u/2097587?v=4)](https://github.com/yharahuts "yharahuts (1 commits)")

### Embed Badge

![Health badge](/badges/yharahuts-space-inside-array-braces-fixer/health.svg)

```
[![Health](https://phpackages.com/badges/yharahuts-space-inside-array-braces-fixer/health.svg)](https://phpackages.com/packages/yharahuts-space-inside-array-braces-fixer)
```

###  Alternatives

[seferov/composer-env-script

Composer script for handling gitignored env files

1139.0k](/packages/seferov-composer-env-script)[verbb/single-cat

A field type to allow users to select a single category from a dropdown.

114.2k](/packages/verbb-single-cat)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
