update php code standards fixer rules

This commit is contained in:
Antonio Ramirez
2017-07-15 16:45:25 +02:00
parent 8c4f7699df
commit f706ebb4fa
72 changed files with 389 additions and 508 deletions

View File

@ -1,4 +1,12 @@
<?php
$header = <<<'EOF'
This file is part of the 2amigos/yii2-usuario project.
(c) 2amigOS! <http://2amigos.us/>
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
EOF;
$finder = PhpCsFixer\Finder::create()
->exclude([
@ -14,6 +22,7 @@ $finder = PhpCsFixer\Finder::create()
->setRules(array(
'@PSR1' => true,
'@PSR2' => true,
'header_comment' => ['header' => $header],
'array_syntax' => array('syntax' => 'short'),
'combine_consecutive_unsets' => true,
'no_extra_consecutive_blank_lines' => array(
@ -31,6 +40,9 @@ $finder = PhpCsFixer\Finder::create()
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true
))
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_align' => true
))
->setFinder($finder);