Skip to content

Instantly share code, notes, and snippets.

@akovalyov
Created January 28, 2017 21:34
Show Gist options
  • Save akovalyov/a10ab8e7f2ba4b55de051eb6f8c110eb to your computer and use it in GitHub Desktop.
Save akovalyov/a10ab8e7f2ba4b55de051eb6f8c110eb to your computer and use it in GitHub Desktop.
<?php
$finder = PhpCsFixer\Finder::create()
->in([__DIR__.'/src', __DIR__.'/tests']);
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
'no_multiline_whitespace_before_semicolons' => true,
'array_syntax' => ['syntax' => 'short'],
'linebreak_after_opening_tag' => true,
'phpdoc_order' => true,
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_strict' => true,
'phpdoc_add_missing_param_annotation' => true,
'psr4' => true,
'strict_comparison' => true,
'strict_param' => true,
'RemoveDebugStatements/dump' => true,
])
->registerCustomFixers([new Drew\DebugStatementsFixers\Dump()])
->setRiskyAllowed(true)
->setFinder($finder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment