costamateus/bracketsmith

A lightweight PHP tool that polishes array formatting โ€” keeping your brackets neat and consistent.

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/costamateus/bracketsmith

v0.1.2 2025-11-07 12:37 UTC

This package is auto-updated.

Last update: 2025-11-07 12:51:07 UTC


README

BracketSmith is a lightweight PHP tool for standardizing array spacing โ€” keeping your square brackets [ ] clean and consistent.

๐Ÿš€ Installations

composer require costamateus/bracketsmith

Or for global use:

composer global require costamateus/bracketsmith

๐Ÿ’ก CLI usage

vendor/bin/bracketsmith --dry-run

Optional parameters:

  • --dry-run โ†’ only checks, without altering files.
  • --verbose โ†’ shows processed files.
  • --help โ†’ displays help information.
  • It is possible to pass specific files or directories:
    vendor/bin/bracketsmith app/Models/User.php    # Process single file
    vendor/bin/bracketsmith app/Models/            # Process directory

โš™๏ธ Configuration

You can customize which directories and files to process by creating a bracketsmith.json file in your project root.

Example bracketsmith.json:

{
	"include": ["app/", "routes/"],
	"exclude": ["vendor/", "storage/", "node_modules/"]
}
  • include: Array of directories/files to process (relative paths or patterns).
  • exclude: Array of patterns to skip (substrings in file paths).

If no config file is found, default include and exclude patterns are used.

Copy bracketsmith.json.example to get started.

๐Ÿงช Tests

composer test

๐Ÿ“„ License

MIT ยฉ Mateus Costa