-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy path.php-cs-fixer.dist.php
51 lines (40 loc) · 1.01 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
40
41
42
43
44
45
46
47
48
49
50
<?php
declare(strict_types=1);
require_once './vendor/autoload.php';
use Nextcloud\CodingStandard\Config;
class CookbookConfig extends Config {
public function __construct($name = 'default') {
parent::__construct($name);
}
public function getRules() : array {
$parentRules = parent::getRules();
$additionalRules = [
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_indent' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_scalar' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true
];
$ret = array_merge(['@PSR12' => true], $parentRules, $additionalRules);
// print_r($ret);
return $ret;
}
}
$config = new CookbookConfig();
$finder = $config
->getFinder()
// ->ignoreVCSIgnored(true)
->exclude('build')
->exclude('l10n')
->exclude('src')
->exclude('node_modules')
->exclude('vendor')
->exclude('.github')
->in(__DIR__ );
$config->setFinder($finder);
// foreach($finder as $f) {
// print_r($f);
// }
// print_r($config);
return $config;