コード例 #1
0
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create();
$config = Symfony\CS\Config\Config::create();
$config->level(null);
$config->fixers(['psr0', 'encoding', 'short_tag', 'braces', 'elseif', 'eof_ending', 'function_call_space', 'function_declaration', 'indentation', 'line_after_namespace', 'linefeed', 'lowercase_constants', 'lowercase_keywords', 'method_argument_space', 'multiple_use', 'parenthesis', 'php_closing_tag', 'single_line_after_imports', 'trailing_spaces', 'visibility', 'blankline_after_open_tag', 'extra_empty_lines', 'join_function', 'multiline_array_trailing_comma', 'namespace_no_leading_whitespace', 'new_with_braces', 'no_blank_lines_after_class_opening', 'no_empty_lines_after_phpdocs', 'object_operator', 'phpdoc_indent', 'phpdoc_no_access', 'phpdoc_no_package', 'phpdoc_scalar', 'phpdoc_short_description', 'phpdoc_trim', 'phpdoc_type_to_var', 'phpdoc_var_without_name', 'remove_leading_slash_use', 'remove_lines_between_uses', 'self_accessor', 'single_array_no_trailing_comma', 'single_blank_line_before_namespace', 'single_quote', 'standardize_not_equal', 'ternary_spaces', 'trim_array_spaces', 'whitespacy_lines', 'concat_with_spaces', 'newline_after_open_tag', 'short_array_syntax', 'unused_use']);
$finder->in(__DIR__)->exclude('test/unit/Fixture');
$config->finder($finder);
return $config;
コード例 #2
0
<?php

return Symfony\CS\Config\Config::create()->finder(Symfony\CS\Finder\DefaultFinder::create()->exclude('app/cache')->exclude('app/log')->exclude('build')->exclude('vendor')->in(__DIR__)->notName('*.phar')->notName('LICENSE')->notName('README.md')->notName('composer.*')->notName('phpunit.xml*'));
コード例 #3
0
<?php

// See https://github.com/FriendsOfPHP/PHP-CS-Fixer for options
$finder = Symfony\CS\Finder\DefaultFinder::create()->exclude('bower_components')->exclude('node_modules')->exclude('vendor')->in(__DIR__);
return Symfony\CS\Config\Config::create()->fixers(array('-indentation', '-braces', '-parenthesis', '-function_declaration', '-concat_without_spaces', 'align_double_arrow', 'align_equals', 'concat_with_spaces', 'ereg_to_preg', 'header_comment', 'long_array_syntax', 'multiline_spaces_before_semicolon', 'newline_after_open_tag', 'no_blank_lines_before_namespace', 'ordered_use', 'php4_constructor', 'php_unit_construct', 'php_unit_strict', 'phpdoc_order', 'phpdoc_var_to_type', 'short_echo_tag', 'strict', 'strict_param'))->finder($finder);
コード例 #4
0
ファイル: cs.php プロジェクト: ngodfraind/DevBundle
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()->exclude('Migrations')->in(__DIR__);
return Symfony\CS\Config\Config::create()->finder($finder);
コード例 #5
0
ファイル: php_cs.php プロジェクト: enrise/frisbee
<?php

return Symfony\CS\Config\Config::create()->fixers(['single_blank_line_before_namespace', 'concat_with_spaces'])->finder(Symfony\CS\Finder\DefaultFinder::create()->exclude('vendor')->exclude('public')->name('*.php')->in(__DIR__ . '/../../'));
コード例 #6
0
ファイル: codesniffer.php プロジェクト: idio/fluff
<?php

// Add in *.ctp files
$finder = Symfony\CS\Finder\DefaultFinder::create()->name('*.ctp')->exclude('deps');
$fixers = array("encoding", "short_tag", "braces", "elseif", "eof_ending", "function_call_space", "function_declaration", "indentation", "line_after_namespace", "linefeed", "lowercase_constants", "lowercase_keywords", "method_argument_space", "multiple_use", "parenthesis", "php_closing_tag", "trailing_spaces", "visibility", "blankline_after_open_tag", "double_arrow_multiline_whitespaces", "duplicate_semicolon", "empty_return", "list_commas", "namespace_no_leading_whitespace", "no_blank_lines_after_class_opening", "operators_spaces", "phpdoc_indent", "phpdoc_no_access", "phpdoc_no_empty_return", "phpdoc_no_package", "phpdoc_params", "phpdoc_scalar", "phpdoc_separation", "phpdoc_trim", "phpdoc_type_to_var", "phpdoc_var_without_name", "remove_leading_slash_use", "return", "self_accessor", "single_array_no_trailing_comma", "single_blank_line_before_namespace", "single_quote", "spaces_before_semicolon", "spaces_cast", "standardize_not_equal", "ternary_spaces", "trim_array_spaces", "unalign_double_arrow", "unalign_equals", "unary_operators_spaces", "unused_use", "whitespacy_lines", "concat_with_spaces", "multiline_spaces_before_semicolon", "newline_after_open_tag", "phpdoc_order", "short_array_syntax");
return Symfony\CS\Config\Config::create()->level(Symfony\CS\FixerInterface::NONE_LEVEL)->fixers($fixers)->finder($finder);
コード例 #7
0
ファイル: phpcs.php プロジェクト: maiquelleonel/balance
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()->in('module/Balance/src');
return Symfony\CS\Config\Config::create()->level(Symfony\CS\FixerInterface::CONTRIB_LEVEL)->fixers(array('-short_array_syntax', '-align_double_arrow', '-logical_not_operators_with_spaces', '-no_blank_lines_before_namespace'))->finder($finder);
コード例 #8
0
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()->ignoreUnreadableDirs()->in(getcwd() . '/src');
return Symfony\CS\Config\Config::create()->finder($finder)->level(Symfony\CS\FixerInterface::PSR2_LEVEL)->setUsingCache(true);
コード例 #9
0
<?php

$fixers = ['-no_empty_lines_after_phpdocs', '-psr0', 'ordered_use', 'php_unit_construct', 'php_unit_strict', 'phpdoc_order', 'short_array_syntax'];
$finder = Symfony\CS\Finder\DefaultFinder::create()->exclude('build')->exclude('var/cache')->exclude('var/log')->exclude('vendor')->ignoreDotFiles(false)->ignoreVCS(true)->in(__DIR__)->notName('*.phar')->notName('LICENSE')->notName('README.md')->notName('composer.*')->notName('phpunit.xml*');
return Symfony\CS\Config\Config::create()->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)->setUsingCache(false)->fixers($fixers)->finder($finder);
コード例 #10
0
ファイル: phpcs.php プロジェクト: middleout/doplio
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()->exclude('vendor')->ignoreUnreadableDirs()->in(__DIR__);
return Symfony\CS\Config\Config::create()->finder($finder)->level(Symfony\CS\FixerInterface::PSR2_LEVEL)->setUsingCache(true);