forked from kzykhys/php-class-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a single test, add php_cs configuration
- Loading branch information
Showing
13 changed files
with
1,486 additions
and
219 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/vendor/ | ||
/build/ | ||
*.phar | ||
*.phar | ||
.php_cs.cache | ||
.php_cs |
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,43 @@ | ||
<?php | ||
|
||
$header = <<<'EOF' | ||
This software is licensed under MIT License. | ||
Copyright (c) 2012, Kazuyuki Hayashi | ||
EOF; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true], | ||
'combine_consecutive_unsets' => true, | ||
// one should use PHPUnit methods to set up expected exception instead of annotations | ||
'general_phpdoc_annotation_remove' => ['expectedException', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp'], | ||
'header_comment' => ['header' => $header], | ||
'heredoc_to_nowdoc' => true, | ||
'list_syntax' => ['syntax' => 'long'], | ||
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'], | ||
'no_short_echo_tag' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_class_elements' => true, | ||
'ordered_imports' => true, | ||
'php_unit_strict' => true, | ||
'php_unit_test_class_requires_covers' => true, | ||
'phpdoc_add_missing_param_annotation' => true, | ||
'phpdoc_order' => true, | ||
'semicolon_after_instruction' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->exclude('tests/Fixtures') | ||
->exclude('vendor') | ||
->in(__DIR__) | ||
) | ||
; |
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
Oops, something went wrong.