Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (80 sloc) 2.75 KB
<?php
/*
* This file is part of Chevere.
*
* (c) Rodolfo Berrios <rodolfo@chevere.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
/*
* This file is part of Chevere.
*
* (c) Rodolfo Berrios <rodolfo@chevere.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$finder = PhpCsFixer\Finder::create()
->notPath('_resources')
->in(__DIR__);
$header = <<<'EOF'
This file is part of Chevere.
(c) Rodolfo Berrios <rodolfo@chevere.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
return PhpCsFixer\Config::create()
->setRules([
'header_comment' => ['header' => $header, 'location' => 'after_open'],
'declare_strict_types' => true,
'@PSR2' => true,
'compact_nullable_typehint' => true,
'declare_equal_normalize' => ['space' => 'none'],
'function_typehint_space' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'return_type_declaration' => ['space_before' => 'none'],
'blank_line_before_return' => true,
'yoda_style' => false,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
'single_quote' => true,
'binary_operator_spaces' => [
'align_double_arrow' => false,
'align_equals' => false,
],
'braces' => [
'allow_single_line_closure' => true,
],
'concat_space' => ['spacing' => 'one'],
'hash_to_slash_comment' => true,
'include' => true,
'lowercase_cast' => true,
'no_extra_consecutive_blank_lines' => [
'curly_brace_block',
'extra',
'parenthesis_brace_block',
'square_brace_block',
'throw',
'use',
],
'no_multiline_whitespace_around_double_arrow' => true,
'no_spaces_around_offset' => true,
'no_whitespace_before_comma_in_array' => true,
'object_operator_without_whitespace' => true,
'single_blank_line_before_namespace' => true,
'ternary_operator_spaces' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
->setLineEnding("\n");
You can’t perform that action at this time.