Skip to content

Instantly share code, notes, and snippets.

@tristanbes
Created April 9, 2019 13:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tristanbes/8f29b6f9336a77fd9b205f3453aae892 to your computer and use it in GitHub Desktop.
Save tristanbes/8f29b6f9336a77fd9b205f3453aae892 to your computer and use it in GitHub Desktop.
<?php
// The path will only work with Bedrock structure
$finder = PhpCsFixer\Finder::create()
->in([__DIR__.'/config', __DIR__.'/web/app/themes'])
->exclude('vendor')
;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setCacheFile(__DIR__.'/.php_cs.cache')
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => true,
],
'braces' => ['allow_single_line_closure' => true],
'native_constant_invocation' => true,
'native_function_invocation' => [
'include' => ['@compiler_optimized'],
'scope' => 'namespaced',
],
'phpdoc_summary' => false,
'no_superfluous_phpdoc_tags' => true,
'no_unreachable_default_argument_value' => true,
'declare_strict_types' => false,
'no_unused_imports' => false
])->setFinder($finder);
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment