-
Notifications
You must be signed in to change notification settings - Fork 8
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
lixiaopei
committed
Mar 23, 2017
1 parent
d63f56a
commit de5bd3b
Showing
15 changed files
with
43 additions
and
92 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,8 +1,6 @@ | ||
<?php | ||
|
||
$header = <<<'EOF' | ||
This file is part of slim-swoole. | ||
This file is part of PHP CS Fixer. | ||
(c) kcloze <[email protected]> | ||
This source file is subject to the MIT license that is bundled | ||
|
@@ -12,69 +10,37 @@ EOF; | |
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'header_comment' => ['header' => $header, 'separate' => 'none'], | ||
'binary_operator_spaces' => [ | ||
'align_double_arrow' => true, | ||
'align_equals' => true, | ||
], | ||
'braces' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'no_empty_statement' => true, | ||
'elseif' => true, | ||
'simplified_null_return' => true, | ||
'encoding' => true, | ||
'single_blank_line_at_eof' => true, | ||
'no_extra_consecutive_blank_lines' => true, | ||
'no_spaces_after_function_name' => true, | ||
'function_declaration' => true, | ||
'indentation_type' => true, | ||
'no_alias_functions' => true, | ||
'blank_line_after_namespace' => true, | ||
'line_ending' => true, | ||
'no_trailing_comma_in_list_call' => true, | ||
'lowercase_constants' => true, | ||
'lowercase_keywords' => true, | ||
'method_argument_space' => true, | ||
'single_import_per_statement' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'no_blank_lines_after_class_opening' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'no_spaces_inside_parenthesis' => true, | ||
'no_closing_tag' => true, | ||
'phpdoc_indent' => true, | ||
'phpdoc_no_access' => true, | ||
'phpdoc_no_empty_return' => true, | ||
'phpdoc_no_package' => true, | ||
'phpdoc_align' => true, | ||
'phpdoc_scalar' => true, | ||
'phpdoc_separation' => true, | ||
'phpdoc_to_comment' => true, | ||
'phpdoc_trim' => true, | ||
'phpdoc_types' => true, | ||
'phpdoc_var_without_name' => true, | ||
'no_extra_consecutive_blank_lines' => ['use'], | ||
'blank_line_before_return' => true, | ||
'self_accessor' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'full_opening_tag' => true, | ||
'single_line_after_imports' => true, | ||
'single_quote' => true, | ||
'no_singleline_whitespace_before_semicolons' => true, | ||
'cast_spaces' => true, | ||
'ternary_operator_spaces' => true, | ||
'no_trailing_whitespace' => true, | ||
'trim_array_spaces' => true, | ||
'no_unused_imports' => true, | ||
'visibility_required' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
|
||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'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, | ||
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'], | ||
'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, | ||
'phpdoc_add_missing_param_annotation' => true, | ||
'phpdoc_order' => true, | ||
'psr4' => true, | ||
'strict_comparison' => false, | ||
'strict_param' => true, | ||
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true], | ||
'concat_space' => ['spacing' => 'one'], | ||
'no_empty_statement' => true, | ||
'simplified_null_return' => true, | ||
'no_extra_consecutive_blank_lines' => true, | ||
'pre_increment' => false | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->files() | ||
->exclude('vendor') | ||
->in(__DIR__) | ||
->name('*.php') | ||
) | ||
->setUsingCache(false) | ||
; |
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
@@ -28,7 +27,7 @@ | |
|
||
//db settings | ||
'db' => [ | ||
'database_type' => 'mysql', | ||
'database_type' => 'mysql', | ||
'database_name' => 'test', | ||
'server' => '127.0.0.1', | ||
'username' => 'root', | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,8 +1,7 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
|
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,15 +1,13 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of slim-swoole. | ||
* | ||
* This file is part of PHP CS Fixer. | ||
* (c) kcloze <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
|
||
|
||
//before | ||
/*$params = [ | ||
'code' => $code, | ||
|