Skip to content

Instantly share code, notes, and snippets.

@dominikb
Created March 6, 2019 18:21
Show Gist options
  • Select an option

  • Save dominikb/c06c426b2e1c0f55f3ac4fe04e6eabf5 to your computer and use it in GitHub Desktop.

Select an option

Save dominikb/c06c426b2e1c0f55f3ac4fe04e6eabf5 to your computer and use it in GitHub Desktop.
PHP CS Fixer configuration
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP71Migration:risky' => true,
'new_with_braces' => false,
'ordered_imports' => [
'sortAlgorithm' => 'length',
],
'not_operator_with_space' => true,
'phpdoc_order' => false,
'declare_strict_types' => true,
'concat_space' => [
'spacing' => 'one',
],
'self_accessor' => false,
'yoda_style' => false,
'no_superfluous_phpdoc_tags' => true,
'php_unit_test_class_requires_covers' => false,
'php_unit_internal_class' => false,
'php_unit_method_casing' => [
'case' => 'snake_case',
],
'php_unit_test_annotation' => [
'style' => 'annotation',
],
])
->setUsingCache(true)
->setRiskyAllowed(true)
->setFinder($finder)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment