Skip to content

Instantly share code, notes, and snippets.

@maldechavda
Last active January 3, 2019 05:14
Show Gist options
  • Select an option

  • Save maldechavda/e4add65c4215eeead8b914691b8a0d34 to your computer and use it in GitHub Desktop.

Select an option

Save maldechavda/e4add65c4215eeead8b914691b8a0d34 to your computer and use it in GitHub Desktop.
PHP laravel php cs fixer settings
<?php
$finder = PhpCsFixer\Finder::create()
->name('*.php')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'app')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'tests');
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'not_operator_with_successor_space' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_order' => true,
'trailing_comma_in_multiline_array' => true,
'yoda_style' => false,
])
->setFinder($finder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment