-
Notifications
You must be signed in to change notification settings - Fork 58
/
.php_cs.php
54 lines (45 loc) · 1.11 KB
/
.php_cs.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
use Ergebnis\PhpCsFixer\Config;
$json_path = __DIR__ . '/composer.json';
$composerinfo = \json_decode(\file_get_contents($json_path));
require_once __DIR__ . '/vendor/autoload.php';
$version = $composerinfo->extra->version;
$header = "JPGraph - Community Edition";
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php73($header), [
'declare_strict_types' => false,
'void_return' => false,
'static_lambda' => false,
'escape_implicit_backslashes' => false,
'final_class' => false,
'final_internal_class' => false,
'final_public_method_for_abstract_class' => false,
'final_static_access' => false,
'global_namespace_import' => false,
'fully_qualified_strict_types' => false,
'visibility_required' => [
'elements' => [
'method',
'property',
],
],
]);
$project_path = getcwd();
$config->getFinder()
->in([
__DIR__
])
->name('*.php')
->exclude([
'.build',
'.configs',
'__pycache__',
'.git',
'node_modules',
'vendor',
'.github',
])
->name('.php_cs.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$config->setCacheFile(__DIR__ . '/.build/csfixer.cache');
return $config;