generated from mimmi20/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.php
54 lines (44 loc) · 1.45 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* This file is part of the mimmi20/monolog-factory package.
*
* Copyright (c) 2022-2024, Thomas Mueller <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types = 1);
$year = date('Y');
$header = <<<EOF
This file is part of the mimmi20/monolog-factory package.
Copyright (c) 2022-{$year}, Thomas Mueller <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$finder = PhpCsFixer\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->append([__DIR__ . '/rector.php'])
->append([__FILE__]);
$rules = require 'vendor/mimmi20/coding-standard/src/php-cs-fixer.config.php';
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules(
array_merge(
$rules,
[
'header_comment' => [
'header' => $header,
'comment_type' => 'PHPDoc',
'location' => 'after_open',
'separate' => 'bottom',
],
'php_unit_strict' => ['assertions' => ['assertAttributeEquals', 'assertAttributeNotEquals', 'assertNotEquals']],
],
),
)
->setUsingCache(true)
->setFinder($finder);