mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 21:26:43 +02:00
CS fixes & upgrading cs fixer config
This commit is contained in:
73
.php_cs
73
.php_cs
@@ -1,15 +1,58 @@
|
||||
<?php
|
||||
|
||||
$finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||
->files()
|
||||
->name('*.php')
|
||||
->in(__DIR__.'/src')
|
||||
->in(__DIR__.'/tests')
|
||||
;
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->fixers(array(
|
||||
'psr0', 'encoding', 'short_tag', 'braces', 'elseif', 'eof_ending', 'function_declaration', 'indentation', 'line_after_namespace', 'linefeed', 'lowercase_constants', 'lowercase_keywords', 'multiple_use', 'php_closing_tag', 'trailing_spaces', 'visibility', 'duplicate_semicolon', 'extra_empty_lines', 'include', 'namespace_no_leading_whitespace', 'object_operator', 'operators_spaces', 'phpdoc_params', 'return', 'single_array_no_trailing_comma', 'spaces_cast', 'standardize_not_equal', 'ternary_spaces', 'unused_use', 'whitespacy_lines',
|
||||
))
|
||||
->finder($finder)
|
||||
;
|
||||
<?php
|
||||
|
||||
$header = <<<EOF
|
||||
This file is part of the Monolog package.
|
||||
|
||||
(c) Jordi Boggiano <j.boggiano@seld.be>
|
||||
|
||||
For the full copyright and license information, please view the LICENSE
|
||||
file that was distributed with this source code.
|
||||
EOF;
|
||||
|
||||
$finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||
->files()
|
||||
->name('*.php')
|
||||
->exclude('Fixtures')
|
||||
->in(__DIR__.'/src')
|
||||
->in(__DIR__.'/tests')
|
||||
;
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->setUsingCache(true)
|
||||
->setRiskyAllowed(true)
|
||||
->setRules(array(
|
||||
'@PSR2' => true,
|
||||
'duplicate_semicolon' => true,
|
||||
'extra_empty_lines' => true,
|
||||
'header_comment' => array('header' => $header),
|
||||
'include' => true,
|
||||
'long_array_syntax' => true,
|
||||
'method_separation' => true,
|
||||
'multiline_array_trailing_comma' => true,
|
||||
'namespace_no_leading_whitespace' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_empty_lines_after_phpdocs' => true,
|
||||
'object_operator' => true,
|
||||
'operators_spaces' => true,
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_order' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_type_to_var' => true,
|
||||
'psr0' => true,
|
||||
'return' => true,
|
||||
'remove_leading_slash_use' => true,
|
||||
'remove_lines_between_uses' => true,
|
||||
'single_array_no_trailing_comma' => true,
|
||||
'single_blank_line_before_namespace' => true,
|
||||
'spaces_cast' => true,
|
||||
'standardize_not_equal' => true,
|
||||
'ternary_spaces' => true,
|
||||
'unused_use' => true,
|
||||
'whitespacy_lines' => true,
|
||||
))
|
||||
->finder($finder)
|
||||
;
|
||||
|
Reference in New Issue
Block a user