PHPackages                             rebuy/php-cs - 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. rebuy/php-cs

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

rebuy/php-cs
============

PHP Coding style configuration for reBuy projects

v1.0.0(9y ago)014.2k1MITPHP

Since Jan 17Pushed 9y ago29 watchersCompare

[ Source](https://github.com/rebuy-de/php-cs)[ Packagist](https://packagist.org/packages/rebuy/php-cs)[ RSS](/packages/rebuy-php-cs/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

php-cs
======

[](#php-cs)

The file [.php\_cs.dist](.php_cs.dist) contains all rules which apply to the coding standards for rebuy. You can find the description of these rules in the [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/README.rst) repository.

Examples
--------

[](#examples)

### Travis code style check

[](#travis-code-style-check)

```
vendor/bin/php-cs-fixer fix --config=vendor/rebuy/php-cs/.php_cs.dist -v --dry-run --using-cache=no `git diff --name-only --diff-filter=ACMRTUXB $TRAVIS_COMMIT_RANGE`
```

**Note:** If you define the path in your own `.php_cs.dist` file, you might want use `--path-mode intersection`.

### Fixing code styles

[](#fixing-code-styles)

```
vendor/bin/php-cs-fixer fix --config=vendor/rebuy/php-cs/.php_cs.dist yourDirectory/`
```

### Fixing code styles from $yourBranch to master

[](#fixing-code-styles-from-yourbranch-to-master)

```
vendor/bin/php-cs-fixer fix --config=.php_cs.dist `git diff --name-only --diff-filter=ACMRTUXB master`
```

Overwriting rules
-----------------

[](#overwriting-rules)

There might be some scenarios where you have to adjust the rules defined here, in this case you can include the base file and extend it to your needs:

```
