<?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;
<?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*'));
<?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);
Beispiel #4
0
<?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__ . '/../../'));
Beispiel #5
0
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create();
$finder->files()->notName('*.xml');
return Symfony\CS\Config\Config::create()->finder($finder);
Beispiel #6
0
<?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);
Beispiel #7
0
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()->exclude('bower_components')->exclude('node_modules')->exclude('vendor')->in(__DIR__);
return Symfony\CS\Config\Config::create()->level(Symfony\CS\FixerInterface::CONTRIB_LEVEL)->fixers(array('-indentation', '-braces', '-parenthesis', '-function_declaration'))->finder($finder);
Beispiel #8
0
<?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);
<?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);
Beispiel #10
0
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the Hoa nor the names of its contributors may be
 *       used to endorse or promote products derived from this software without
 *       specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
// Hoa defined fixers.
$fixers = ['Author', 'ControlFlowStatement', 'Copyright', 'NoBlankLinesBeforeEntity', 'PhpdocConstructorReturn', 'PhpdocThrows', 'PhpdocVar'];
$out = Symfony\CS\Config\Config::create();
$out->level(Symfony\CS\FixerInterface::PSR2_LEVEL);
foreach ($fixers as $fixer) {
    require __DIR__ . DIRECTORY_SEPARATOR . 'Fixer' . DIRECTORY_SEPARATOR . $fixer . '.php';
    $classname = 'Hoa\\Devtools\\Resource\\PHPCsFixer\\Fixer\\' . $fixer;
    $out->addCustomFixer(new $classname());
}
return $out->fixers(['align_double_arrow', 'align_equals', 'blankline_after_open_tag', 'concat_with_spaces', 'no_blank_lines_after_class_opening', 'ordered_use', 'phpdoc_no_access', 'remove_leading_slash_use', 'remove_leading_slash_uses', 'self_accessor', 'short_array_syntax', 'spaces_cast', 'unused_use', 'whitespacy_lines', 'author', 'control_flow_statement', 'copyright', 'no_blank_lines_before_entity', 'phpdoc_constructor_return', 'phpdoc_throws', 'phpdoc_var']);
<?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);
Beispiel #12
0
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()->in('module/Balance');
return Symfony\CS\Config\Config::create()->level(Symfony\CS\FixerInterface::CONTRIB_LEVEL)->fixers(array('-align_double_arrow', '-logical_not_operators_with_spaces', '-long_array_syntax', '-no_blank_lines_before_namespace', '-php_unit_strict', 'multiline_array_trailing_comma', 'single_array_no_trailing_comma', 'unused_use'))->finder($finder);