PHPackages                             rabbitinternet/cs-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. rabbitinternet/cs-fixer

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

rabbitinternet/cs-fixer
=======================

php-cs-fixer with github hook and config

v1.4.0(3y ago)011.8k1Shell

Since May 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/AlphaFounders/cs-fixer)[ Packagist](https://packagist.org/packages/rabbitinternet/cs-fixer)[ RSS](/packages/rabbitinternet-cs-fixer/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (9)Used By (0)

PHP Coding standard fixer
=========================

[](#php-coding-standard-fixer)

This package is based on  with addition of git pre-commit hook installation.

The hook will prevent the commit if the code does not comply with the coding standard rules

Default set of rules that are fully extendable

Installation
------------

[](#installation)

#### Require a package

[](#require-a-package)

```
composer require --dev rabbitinternet/cs-fixer

```

#### Add composer init-hook command

[](#add-composer-init-hook-command)

```
"scripts": {
    "init-hook": "composer run-script post-install-cmd -d ./vendor/rabbitinternet/cs-fixer"
}

```

#### Install the git hook

[](#install-the-git-hook)

```
composer run-script init-hook

```

Manual Usage
------------

[](#manual-usage)

```
vendor/bin/cs-fixer help

```

**Note: Composer can install the binaries in custom dir instead of vendor/bin/ (sylius installs in bin/)**

Rules configuration
-------------------

[](#rules-configuration)

To override default rules add `.php_cs_rules.php` file in the root of the project

```
