-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c91786a
Showing
60 changed files
with
21,698 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/vendor | ||
.phpunit.result.cache | ||
.php_cs.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
|
||
$header = <<<'EOF' | ||
This file is part of Ymir WordPress plugin. | ||
(c) Carl Alexander <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
EOF; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PHP56Migration' => true, | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'align_multiline_comment' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'blank_line_before_statement' => true, | ||
'combine_consecutive_issets' => true, | ||
'combine_consecutive_unsets' => true, | ||
'declare_strict_types' => true, | ||
// one should use PHPUnit methods to set up expected exception instead of annotations | ||
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedException', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp']], | ||
'header_comment' => ['header' => $header], | ||
'heredoc_to_nowdoc' => true, | ||
'list_syntax' => ['syntax' => 'long'], | ||
'method_argument_space' => ['ensure_fully_multiline' => true], | ||
'method_chaining_indentation' => false, | ||
'native_function_invocation' => false, | ||
'no_extra_consecutive_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], | ||
'no_null_property_initialization' => true, | ||
'no_short_echo_tag' => true, | ||
'no_superfluous_phpdoc_tags' => ['allow_mixed' => false], | ||
'no_unneeded_curly_braces' => true, | ||
'no_unneeded_final_method' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_class_elements' => [ | ||
'order' => [ | ||
'use_trait', | ||
'constant_public', | ||
'constant_protected', | ||
'constant_private', | ||
'property_public', | ||
'property_protected', | ||
'property_private', | ||
'construct', | ||
'destruct', | ||
'magic', | ||
'method_public_static', | ||
'method_public', | ||
'method_protected_static', | ||
'method_protected', | ||
'method_private_static', | ||
'method_private', | ||
], | ||
'sortAlgorithm' => 'alpha' | ||
], | ||
'ordered_imports' => true, | ||
'php_unit_construct' => true, | ||
'php_unit_test_class_requires_covers' => true, | ||
'php_unit_dedicate_assert' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_types_order' => ['null_adjustment' => 'always_last'], | ||
'semicolon_after_instruction' => true, | ||
'single_line_comment_style' => true, | ||
'visibility_required' => ['const', 'property', 'method'], | ||
'yoda_style' => true, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in([ | ||
__DIR__ . '/src', | ||
]) | ||
) | ||
; |
Oops, something went wrong.