This repository was archived by the owner on Mar 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.php_cs
More file actions
38 lines (31 loc) · 1.17 KB
/
.php_cs
File metadata and controls
38 lines (31 loc) · 1.17 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
28
29
30
31
32
33
34
35
36
37
38
<?php
use Narrowspark\CS\Config\Config;
$header = <<<'EOF'
This file is part of Narrowspark Framework.
(c) Daniel Bannert <d.bannert@anolilab.de>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
$config = new Config($header, [
'final_class' => false,
'PhpCsFixerCustomFixers/no_commented_out_code' => false,
'PhpCsFixerCustomFixers/phpdoc_no_superfluous_param' => false,
'PhpCsFixerCustomFixers/data_provider_return_type' => true,
'PhpCsFixerCustomFixers/data_provider_name' => true,
'PhpCsFixerCustomFixers/comment_surrounded_by_spaces' => true,
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_useless_sprintf' => true,
'PhpCsFixerCustomFixers/php_unit_no_useless_return' => true,
'PhpCsFixerCustomFixers/single_line_throw' => true,
]);
$config->getFinder()
->files()
->in(__DIR__)
->exclude('build')
->exclude('vendor')
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
$config->setCacheFile($cacheDir . '/.php_cs.cache');
return $config;