forked from owncloud/core
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php-cs-fixer.dist.php
54 lines (48 loc) · 1.31 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
51
52
53
54
<?php
$dirToParse = 'apps';
$dirIterator = new DirectoryIterator(__DIR__ . '/' . $dirToParse);
$bundledApps = [
'comments',
'dav',
'encryption',
'federatedfilesharing',
'federation',
'files',
'files_external',
'files_sharing',
'files_trashbin',
'files_versions',
'provisioning_api',
'systemtags',
'updatenotification'
];
$excludeDirs = [
'lib/composer',
'build',
'apps/files_external/3rdparty',
'apps-external',
'data',
'3rdparty',
];
foreach ($dirIterator as $fileinfo) {
$filename = $fileinfo->getFilename();
if ($fileinfo->isDir() && !$fileinfo->isDot() && !in_array($filename, $bundledApps)) {
$excludeDirs[] = $dirToParse . '/' . $filename;
}
}
$finder = PhpCsFixer\Finder::create()
->exclude($excludeDirs)
->notPath('config/config.php')
->notPath('config/config.backup.php')
->notPath('tests/autoconfig*')
->notPath('apps/files_external/templates/list.php')
->notPath('apps/files_external/templates/settings.php')
->notPath('core/templates/layout.user.php')
->notPath('core/templates/twofactorselectchallenge.php')
->notPath('settings/templates/email.new_user.php')
->notPath('settings/templates/settingsPage.php')
->notPath('settings/templates/panels/personal/settings.development.notice.php')
->in(__DIR__);
$config = new OC\CodingStandard\Config();
$config->setFinder($finder);
return $config;