forked from phpWhois/phpWhois
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php_cs.dist
49 lines (43 loc) · 1.62 KB
/
.php_cs.dist
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
<?php
$header = '
NOTICE OF LICENSE
This source file is released under GNU General Public License v2.
@copyright 1999-2005 easyDNS Technologies Inc. & Mark Jeftovic
@copyright 2005-2014 David Saez
@copyright 2014-2019 Dmitry Lukashin
@copyright 2019-2020 Niko Granö (https://granö.fi)
';
/** @noinspection PhpUndefinedNamespaceInspection */
$finder = PhpCsFixer\Finder::create()
->in(['./src', './tests']);
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP71Migration:risky' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'cast_spaces' => false,
'binary_operator_spaces' => ['align_double_arrow' => true],
'concat_space' => ['spacing' => 'none'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'mb_str_functions' => true,
'native_function_invocation' => true,
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'protected_to_private' => false,
'phpdoc_align' => true,
'strict_comparison' => true,
'strict_param' => true,
'header_comment' => array('header' => $header, 'commentType' => 'PHPDoc'),
'method_argument_space' => ['ensure_fully_multiline' => true, 'keep_multiple_spaces_after_comma' => false],
])
->setIndent(' ')
->setLineEnding("\n")
->setFinder($finder);