PHPackages                             binary-cats/laravel-php-styles - 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. binary-cats/laravel-php-styles

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

binary-cats/laravel-php-styles
==============================

Set of shared PHP style for PHP-CS-Fixer, based on Symphony (PRS12, PSR2) PHP Coding standard.

2.0.0(5y ago)08MITPHP

Since Apr 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/binary-cats/laravel-php-styles)[ Packagist](https://packagist.org/packages/binary-cats/laravel-php-styles)[ Docs](https://github.com/binary-cats/laravel-php-styles)[ RSS](/packages/binary-cats-laravel-php-styles/feed)WikiDiscussions main Synced today

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

PHP Styles
==========

[](#php-styles)

Set of shared PHP styles for PHP-CS-Fixer, based on Symphony (PRS12, PSR2) PHP Coding standard.

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

[](#installation)

via Composer:

```
composer require binary-cats/laravel-php-styles --dev
```

It will add the package to the `require-dev` block of your `composer.json`.

You can also add it manually, like this, to get the latest version:

```
    "require-dev": {
        "binary-cats/laravel-php-styles": "^2.0"
    },
```

Laravel
-------

[](#laravel)

You can publish the stub file using

```
php artisan vendor:publish --provider=BinaryCats\\PhpStyles\\PhpStyleServiceProvider
```

You should also add `.php-cs-fixer.cache` to your `.gitignore`.

Config
------

[](#config)

The package provides with the current set of [rules](./src/rules.php):

```
return [
    '@Symfony' => true,
    'AdamWojs/phpdoc_force_fqcn_fixer' => true,
    'concat_space' => ['spacing' => 'one'],
    'new_with_braces' => true,
    'no_superfluous_phpdoc_tags' => false,
    'not_operator_with_successor_space' => true,
    'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
    'phpdoc_separation' => false,
];
```

Integration
-----------

[](#integration)

PHP-CS-Fixer is going to expect your *default* configuration to be in a `/.php-cs-fixer.dist.php` file.

```
