Skip to content

Instantly share code, notes, and snippets.

@simioluwatomi
Last active Aug 20, 2020
Embed
What would you like to do?
My php cs fixer configuration
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.15|configurator
* you can change this configuration by importing this file.
*/
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setLineEnding("\r\n")
->setRules([
'@Symfony' => true,
'@PSR2' => true,
'@PhpCsFixer' => true,
'array_syntax' => ['syntax' => 'short'],
'no_superfluous_phpdoc_tags' => false,
'binary_operator_spaces' => ['align_double_arrow' => true],
'braces' => ['allow_single_line_closure' => true],
'class_definition' => ['single_line' => true],
'increment_style' => ['style' => 'post'],
'logical_operators' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'blank_line_before_statement' => ['statements' => ['return', 'throw']],
'ordered_imports' => ['sort_algorithm' => 'length'],
'php_unit_method_casing' => ['case' => 'snake_case'],
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
])
->setFinder(PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment