forked from eatvio/eatvio-infra
Added .php-cs-fixer config
This commit is contained in:
67
.php-cs-fixer.php
Normal file
67
.php-cs-fixer.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpCsFixer\Config;
|
||||
use PhpCsFixer\Finder;
|
||||
|
||||
return
|
||||
(new Config())
|
||||
->setCacheFile(__DIR__ . '/storage/framework/cache/.php_cs')
|
||||
->setFinder(
|
||||
Finder::create()
|
||||
->in([
|
||||
__DIR__ . '/public',
|
||||
__DIR__ . '/config',
|
||||
__DIR__ . '/app',
|
||||
__DIR__ . '/bootstrap',
|
||||
__DIR__ . '/database',
|
||||
__DIR__ . '/routes',
|
||||
// __DIR__ . '/storage',
|
||||
__DIR__ . '/tests',
|
||||
])
|
||||
->append([
|
||||
__FILE__,
|
||||
])
|
||||
)
|
||||
->setRules([
|
||||
'@PSR12' => true,
|
||||
'@PSR12:risky' => true,
|
||||
'@PHP80Migration' => true,
|
||||
'@PHP80Migration:risky' => true,
|
||||
'@PHPUnit84Migration:risky' => true,
|
||||
'@PhpCsFixer' => true,
|
||||
'@PhpCsFixer:risky' => true,
|
||||
|
||||
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
|
||||
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'cast_spaces' => ['space' => 'none'],
|
||||
'binary_operator_spaces' => false,
|
||||
|
||||
'phpdoc_to_comment' => false,
|
||||
'phpdoc_separation' => false,
|
||||
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
|
||||
'phpdoc_align' => false,
|
||||
|
||||
'operator_linebreak' => false,
|
||||
|
||||
'global_namespace_import' => true,
|
||||
|
||||
'blank_line_before_statement' => false,
|
||||
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
|
||||
|
||||
'fopen_flags' => ['b_mode' => true],
|
||||
|
||||
'php_unit_strict' => false,
|
||||
'php_unit_test_class_requires_covers' => false,
|
||||
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
|
||||
|
||||
'yoda_style' => false,
|
||||
|
||||
'final_class' => false,
|
||||
'final_public_method_for_abstract_class' => true,
|
||||
'self_static_accessor' => true,
|
||||
|
||||
'static_lambda' => true,
|
||||
]);
|
||||
Reference in New Issue
Block a user