-
Notifications
You must be signed in to change notification settings - Fork 312
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
27 lines (24 loc) · 1.28 KB
/
.php-cs-fixer.php
File metadata and controls
27 lines (24 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
// https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst
$config = new PhpCsFixer\Config();
$rules = [
'@PER-CS3x0' => true, // The default rule.
'@autoPHPMigration' => true, // Uses min PHP version for regular migrations.
'blank_line_after_opening_tag' => false, // Do not waste space between <?php and declare.
'concat_space' => ['spacing' => 'none'], // Custom library style.
'declare_strict_types' => true, // Enforce strict code.
'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false],
'php_unit_attributes' => true,
'php_unit_construct' => true,
'php_unit_method_casing' => true,
'php_unit_test_class_requires_covers' => true,
// Do not enable by default. These rules require review!! (but they are useful)
// '@autoPHPMigration:risky' => true,
// '@autoPHPUnitMigration:risky' => true,
];
$config->setRules($rules);
$config->setHideProgress(true);
$config->setRiskyAllowed(true);
$config->setUsingCache(false);
$config->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
return $config;