Skip to content

binalogue/php-cs-fixer-config

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binalogue - welovedesign&welovetodesign

binalogue/php-cs-fixer-config

CI

Opinionated styling rules for PHP-CS-Fixer.

Getting Started

Installing

Because we haven't submitted the package to Packagist, you have to tell Composer where to find the package, using the repositories block:

"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/binalogue/php-cs-fixer-config"
  }
]

Then:

composer require binalogue/php-cs-fixer-config:dev-master --dev

Usage

In your .php_cs.dist config file:

<?php

$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__.'/src')
    ->in(__DIR__.'/tests');

return Binalogue\styles($finder);

For Laravel projects:

<?php

$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__)
    ->exclude(['bootstrap', 'storage', 'vendor'])
    ->name('*.php')
    ->notName('*.blade.php')
    ->ignoreDotFiles(true)
    ->ignoreVCS(true);

return Binalogue\styles($finder);

Built With

Authors

Languages

  • PHP 100.0%