1
0
mirror of synced 2024-12-05 03:06:02 +03:00
DeliveryModuleBundle/.php_cs
2020-08-18 17:45:16 +03:00

57 lines
1.3 KiB
PHP

<?php
require_once __DIR__ . '/vendor/autoload.php';
$finder = PhpCsFixer\Finder::create()
->files()
->name('*.php')
->in(__DIR__)
->exclude([
'vendor',
])
->ignoreDotFiles(true)
->ignoreVCS(true)
;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
// exceptions
'single_line_throw' => false,
// php file
'concat_space' => ['spacing' => 'one'],
// namespace and imports
'ordered_imports' => true,
'global_namespace_import' => [
'import_classes' => false,
'import_constants' => false,
'import_functions' => false,
],
// standard functions and operators
'native_constant_invocation' => false,
'native_function_invocation' => false,
'modernize_types_casting' => true,
'is_null' => true,
// arrays
'array_syntax' => [
'syntax' => 'short',
],
// phpdoc
'phpdoc_annotation_without_dot' => false,
'phpdoc_summary' => false,
// logical operators
'logical_operators' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__ . '.php_cs.cache')
;