forked from azuyalabs/yasumi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
40 lines (35 loc) · 1.13 KB
/
.php-cs-fixer.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
40
<?php
declare(strict_types=1);
/**
* This file is part of the Yasumi package.
*
* Copyright (c) 2015 - 2023 AzuyaLabs
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Sacha Telgenhof <me at sachatelgenhof dot com>
*/
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
$config = new PhpCsFixer\Config();
$config->setRiskyAllowed(true)->setRules([
'@PER' => true,
'@Symfony' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'explicit_string_variable' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true],
'not_operator_with_successor_space' => true,
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true ],
'ordered_class_elements' => true,
// Risky
'declare_strict_types' => true,
'dir_constant' => true,
'get_class_to_class_keyword' => true,
'is_null' => true,
'modernize_strpos' => true,
'modernize_types_casting' => true,
'self_accessor' => true,
])->setFinder($finder);
return $config;