.php_cs.dist
.php_cs.dist
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create();
$csFixer = PhpCsFixer\Config::create();
$csFixer
->setFinder($finder)
->setUsingCache(false)
->setRiskyAllowed(true);
return $csFixer;
.php_cs.dist
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create();
$finder
->in('src')
->notPath('index.php');
$csFixer = PhpCsFixer\Config::create();
$csFixer->setFinder($finder);
return $csFixer;
<?php
declare(strict_types=1);
$rules = [
'@Symfony' => true,
'@PHP71Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
'void_return' => true,
'yoda_style' => false,
'increment_style' => ['style' => 'post'],
];
$csFixer = PhpCsFixer\Config::create();
$csFixer->setRules($rules);
return $csFixer;
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create();
$finder->in('src')->notPath('index.php');
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@PHP71Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
'void_return' => true,
'yoda_style' => false,
'increment_style' => ['style' => 'post'],
])
->setFinder($finder)
->setUsingCache(false)
->setRiskyAllowed(true);
https://mlocati.github.io/php-cs-fixer-configurator/
slides.com/alessandrofeitoza
www.alessandrofeitoza.eu
twitter.com/FeitozaAle