Skip to content

Instantly share code, notes, and snippets.

@mazedlx
Created April 5, 2021 09:32
Show Gist options
  • Save mazedlx/324284f4842263466057cf304702dab6 to your computer and use it in GitHub Desktop.
Save mazedlx/324284f4842263466057cf304702dab6 to your computer and use it in GitHub Desktop.
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('bootstrap/cache')
->exclude('node_modules')
->exclude('storage')
->in(__DIR__)
->notName('*.blade.php')
->notName('.phpstorm.meta.php')
->notName('_ide_*.php');
return PhpCsFixer\Config::create()
->setUsingCache(false)
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'concat_space' => ['spacing' => 'one'],
'increment_style' => ['style' => 'post'],
'linebreak_after_opening_tag' => true,
'mb_str_functions' => true,
'new_with_braces' => false,
'no_php4_constructor' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'php_unit_strict' => true,
'phpdoc_order' => true,
'simplified_null_return' => true,
'strict_comparison' => true,
'strict_param' => true,
'php_unit_method_casing' => ['case' => 'snake_case'],
'php_unit_test_annotation' => ['style' => 'annotation'],
])
->setFinder($finder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment