Skip to content

Instantly share code, notes, and snippets.

@petronetto
Created March 31, 2018 04:56
Show Gist options
  • Save petronetto/4ac358db8dd370035df1115eab626aa1 to your computer and use it in GitHub Desktop.
Save petronetto/4ac358db8dd370035df1115eab626aa1 to your computer and use it in GitHub Desktop.
PHPCS Fixer configs
<?php
$config = PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'ordered_imports' => true,
'no_whitespace_in_blank_line' => true,
'blank_line_before_statement' => true,
'single_quote' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => true,
'phpdoc_inline_tag' => true,
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => true,
],
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/core')
->in(__DIR__ . '/app')
)
;
return $config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment