-
Notifications
You must be signed in to change notification settings - Fork 88
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
Showing
7 changed files
with
114 additions
and
77 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
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
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,6 +1,4 @@ | ||
/.idea | ||
/.php_cs | ||
/.phpunit.result.cache | ||
/vendor | ||
/composer.lock | ||
/phpunit.xml | ||
/.phpunit.result.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,107 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PhpCsFixer\Config; | ||
use PhpCsFixer\Finder; | ||
|
||
$finder = Finder::create() | ||
->in([__DIR__]) | ||
->exclude(['vendor']); | ||
|
||
return (new Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PhpCsFixer' => true, | ||
'@PhpCsFixer:risky' => true, | ||
'@PHP71Migration' => true, | ||
'@PHP71Migration:risky' => true, | ||
|
||
// required by PSR-12 | ||
'concat_space' => [ | ||
'spacing' => 'one', | ||
], | ||
|
||
// disable some too strict rules | ||
'phpdoc_types_order' => [ | ||
'null_adjustment' => 'always_last', | ||
'sort_algorithm' => 'none', | ||
], | ||
'single_line_throw' => false, | ||
'yoda_style' => [ | ||
'equal' => false, | ||
'identical' => false, | ||
], | ||
'native_constant_invocation' => true, | ||
'native_function_invocation' => false, | ||
'void_return' => false, | ||
'blank_line_before_statement' => [ | ||
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'exit'], | ||
], | ||
'final_internal_class' => false, | ||
'combine_consecutive_issets' => false, | ||
'combine_consecutive_unsets' => false, | ||
'multiline_whitespace_before_semicolons' => false, | ||
'no_superfluous_elseif' => false, | ||
'ordered_class_elements' => false, | ||
'php_unit_internal_class' => false, | ||
'php_unit_test_class_requires_covers' => false, | ||
'phpdoc_add_missing_param_annotation' => false, | ||
'return_assignment' => false, | ||
'comment_to_phpdoc' => false, | ||
'general_phpdoc_annotation_remove' => [ | ||
'annotations' => ['author', 'copyright', 'throws'], | ||
], | ||
|
||
// fn => without curly brackets is less readable, | ||
// also prevent bounding of unwanted variables for GC | ||
'use_arrow_functions' => false, | ||
|
||
// TODO disable too strict rules for now - remove once the CS is updated | ||
'binary_operator_spaces' => false, | ||
'blank_line_after_opening_tag' => false, | ||
'blank_line_before_statement' => false, | ||
'cast_spaces' => false, | ||
'declare_strict_types' => false, | ||
'explicit_string_variable' => false, | ||
'fully_qualified_strict_types' => false, | ||
'general_phpdoc_annotation_remove' => false, | ||
'global_namespace_import' => false, | ||
'increment_style' => false, | ||
'is_null' => false, | ||
'method_chaining_indentation' => false, | ||
'modernize_types_casting' => false, | ||
'native_constant_invocation' => false, | ||
'no_extra_blank_lines' => false, | ||
'no_superfluous_phpdoc_tags' => false, | ||
'no_trailing_whitespace' => false, | ||
'no_unused_imports' => false, | ||
'no_useless_else' => false, | ||
'operator_linebreak' => false, | ||
'php_unit_data_provider_name' => false, | ||
'php_unit_data_provider_return_type' => false, | ||
'php_unit_data_provider_static' => false, | ||
'php_unit_strict' => false, | ||
'php_unit_test_case_static_method_calls' => false, | ||
'phpdoc_align' => false, | ||
'phpdoc_annotation_without_dot' => false, | ||
'phpdoc_no_alias_tag' => false, | ||
'phpdoc_no_empty_return' => false, | ||
'phpdoc_order' => false, | ||
'phpdoc_scalar' => false, | ||
'phpdoc_separation' => false, | ||
'phpdoc_summary' => false, | ||
'phpdoc_to_comment' => false, | ||
'phpdoc_trim' => false, | ||
'phpdoc_var_without_name' => false, | ||
'single_line_comment_style' => false, | ||
'single_line_empty_body' => false, | ||
'statement_indentation' => false, | ||
'static_lambda' => false, | ||
'strict_comparison' => false, | ||
'trailing_comma_in_multiline' => false, | ||
'visibility_required' => false, | ||
'yoda_style' => false, | ||
]) | ||
->setFinder($finder) | ||
->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer.' . md5(__DIR__) . '.cache'); |
This file was deleted.
Oops, something went wrong.
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
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