-
-
Notifications
You must be signed in to change notification settings - Fork 437
/
.php-cs-fixer.dist.php
39 lines (39 loc) · 1.71 KB
/
.php-cs-fixer.dist.php
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
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.4.0|configurator
* you can change this configuration by importing this file.
*/
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
// see https://cs.symfony.com/doc/ruleSets/PER-CS2.0.html
'@PER-CS2.0' => true,
// RISKY: Use && and || logical operators instead of and and or.
'logical_operators' => true,
// RISKY: Replaces intval, floatval, doubleval, strval and boolval function calls with according type casting operator.
'modernize_types_casting' => true,
// PHP84: Adds or removes ? before single type declarations or |null at the end of union types when parameters have a default null value.
'nullable_type_declaration_for_default_null_value' => true,
// Convert double quotes to single quotes for simple strings.
'single_quote' => true,
// Arguments lists, array destructuring lists, arrays that are multi-line, match-lines and parameters lists must have a trailing comma.
// removed "match" and "parameters" for PHP7
// see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8308
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arguments', 'array_destructuring', 'arrays']],
])
->setFinder(
PhpCsFixer\Finder::create()
->in([
__DIR__,
])
->exclude([
'lib/3Dsecure/',
'lib/LinLibertineFont/',
'lib/Unserialize/',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
);