mirror of
https://github.com/danog/file.git
synced 2024-11-26 20:04:51 +01:00
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
|
<?php
|
||
|
|
||
|
return PhpCsFixer\Config::create()
|
||
|
->setRiskyAllowed(true)
|
||
|
->setRules([
|
||
|
"@PSR1" => true,
|
||
|
"@PSR2" => true,
|
||
|
"braces" => [
|
||
|
"allow_single_line_closure" => true,
|
||
|
"position_after_functions_and_oop_constructs" => "same",
|
||
|
],
|
||
|
"array_syntax" => ["syntax" => "short"],
|
||
|
"cast_spaces" => true,
|
||
|
"combine_consecutive_unsets" => true,
|
||
|
"function_to_constant" => true,
|
||
|
"no_multiline_whitespace_before_semicolons" => true,
|
||
|
"no_unused_imports" => true,
|
||
|
"no_useless_else" => true,
|
||
|
"no_useless_return" => true,
|
||
|
"no_whitespace_before_comma_in_array" => true,
|
||
|
"no_whitespace_in_blank_line" => true,
|
||
|
"non_printable_character" => true,
|
||
|
"normalize_index_brace" => true,
|
||
|
"ordered_imports" => true,
|
||
|
"php_unit_construct" => true,
|
||
|
"php_unit_dedicate_assert" => true,
|
||
|
"php_unit_fqcn_annotation" => true,
|
||
|
"phpdoc_summary" => true,
|
||
|
"phpdoc_types" => true,
|
||
|
"psr4" => true,
|
||
|
"return_type_declaration" => ["space_before" => "none"],
|
||
|
"short_scalar_cast" => true,
|
||
|
"single_blank_line_before_namespace" => true,
|
||
|
])
|
||
|
->setFinder(
|
||
|
PhpCsFixer\Finder::create()
|
||
|
->in(__DIR__ . "/lib")
|
||
|
->in(__DIR__ . "/test")
|
||
|
);
|