Skip to content

Commit 07ca7e2

Browse files
kubawerloskeradus
authored andcommitted
Update CS (#8)
1 parent 3cae983 commit 07ca7e2

File tree

4 files changed

+60
-106
lines changed

4 files changed

+60
-106
lines changed

.php_cs.dist

+3-49
Original file line numberDiff line numberDiff line change
@@ -23,56 +23,10 @@ if (PHP_VERSION_ID < 70000) {
2323
return PhpCsFixer\Config::create()
2424
->setRiskyAllowed(true)
2525
->setRules([
26-
// '@PHP56Migration' => true,
26+
'@PhpCsFixer' => true,
27+
'@PhpCsFixer:risky' => true,
2728
'@PHPUnit60Migration:risky' => true,
28-
'@Symfony' => true,
29-
'@Symfony:risky' => true,
30-
'align_multiline_comment' => true,
31-
'array_indentation' => true,
32-
'array_syntax' => ['syntax' => 'short'],
33-
'blank_line_before_statement' => true,
34-
'combine_consecutive_issets' => true,
35-
'combine_consecutive_unsets' => true,
36-
'comment_to_phpdoc' => true,
37-
'compact_nullable_typehint' => true,
38-
'escape_implicit_backslashes' => true,
39-
'explicit_indirect_variable' => true,
40-
'explicit_string_variable' => true,
41-
'final_internal_class' => true,
42-
'fully_qualified_strict_types' => true,
43-
'function_to_constant' => ['functions' => ['get_class', 'get_called_class', 'php_sapi_name', 'phpversion', 'pi']],
44-
'header_comment' => ['header' => $header],
45-
'heredoc_to_nowdoc' => true,
46-
'list_syntax' => ['syntax' => 'long'],
47-
'method_argument_space' => ['ensure_fully_multiline' => true],
48-
'method_chaining_indentation' => true,
49-
'multiline_comment_opening_closing' => true,
50-
'no_alternative_syntax' => true,
51-
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
52-
'no_null_property_initialization' => true,
53-
'no_short_echo_tag' => true,
54-
'no_superfluous_elseif' => true,
55-
'no_unneeded_curly_braces' => true,
56-
'no_unneeded_final_method' => true,
57-
'no_unreachable_default_argument_value' => true,
58-
'no_useless_else' => true,
59-
'no_useless_return' => true,
60-
'ordered_class_elements' => true,
61-
'ordered_imports' => true,
62-
'php_unit_ordered_covers' => true,
63-
'php_unit_set_up_tear_down_visibility' => true,
64-
'php_unit_strict' => true,
65-
'php_unit_test_annotation' => true,
66-
'php_unit_test_class_requires_covers' => true,
67-
'phpdoc_add_missing_param_annotation' => true,
68-
'phpdoc_order' => true,
69-
'phpdoc_types_order' => true,
70-
'semicolon_after_instruction' => true,
71-
'single_line_comment_style' => true,
72-
'strict_comparison' => true,
73-
'strict_param' => true,
74-
'string_line_ending' => true,
75-
'yoda_style' => true,
29+
'header_comment' => ['header' => $header],
7630
])
7731
->setFinder($finder)
7832
;

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
- COMPOSER_FLAGS=""
2424

2525
stages:
26-
- Static Code Analysis
26+
- Static code analysis
2727
- Test
2828

2929
before_install:
@@ -43,8 +43,8 @@ script:
4343
jobs:
4444
include:
4545
-
46-
stage: Static Code Analysis
47-
php: 7.2
46+
stage: Static code analysis
47+
php: 7.3
4848
install:
4949
- travis_retry composer update -d dev-tools $DEFAULT_COMPOSER_FLAGS
5050
- composer info -d dev-tools -D | sort

composer.json

+37-37
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
{
2-
"name": "php-cs-fixer/phpunit-constraint-isidenticalstring",
3-
"type": "library",
4-
"description": "Constraint for testing strings considering not-same line endings.",
5-
"license": "MIT",
6-
"authors": [
7-
{
8-
"name": "Dariusz Rumiński",
9-
"email": "dariusz.ruminski@gmail.com"
10-
}
11-
],
12-
"require": {
13-
"php": "^5.5 || ^7.0",
14-
"phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0 || ^8.0",
15-
"phpunitgoodpractices/polyfill": "^1.1"
16-
},
17-
"conflict": {
18-
"hhvm": "*"
19-
},
20-
"require-dev": {
21-
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
22-
"symfony/phpunit-bridge": "^3.2.2 || ^4.0"
23-
},
24-
"config": {
25-
"optimize-autoloader": true,
26-
"sort-packages": true
27-
},
28-
"autoload": {
29-
"psr-4": {
30-
"PhpCsFixer\\PhpunitConstraintIsIdenticalString\\": "src/"
2+
"name": "php-cs-fixer/phpunit-constraint-isidenticalstring",
3+
"type": "library",
4+
"description": "Constraint for testing strings considering not-same line endings.",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Dariusz Rumiński",
9+
"email": "dariusz.ruminski@gmail.com"
10+
}
11+
],
12+
"require": {
13+
"php": "^5.5 || ^7.0",
14+
"phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0 || ^8.0",
15+
"phpunitgoodpractices/polyfill": "^1.1"
16+
},
17+
"conflict": {
18+
"hhvm": "*"
19+
},
20+
"require-dev": {
21+
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
22+
"symfony/phpunit-bridge": "^3.2.2 || ^4.0"
23+
},
24+
"config": {
25+
"optimize-autoloader": true,
26+
"sort-packages": true
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"PhpCsFixer\\PhpunitConstraintIsIdenticalString\\": "src/"
31+
},
32+
"files": [
33+
"src/Constraint/IsIdenticalString.php"
34+
]
3135
},
32-
"files": [
33-
"src/Constraint/IsIdenticalString.php"
34-
]
35-
},
36-
"autoload-dev": {
37-
"psr-4": {
38-
"PhpCsFixer\\PhpunitConstraintIsIdenticalString\\Tests\\": "tests/"
36+
"autoload-dev": {
37+
"psr-4": {
38+
"PhpCsFixer\\PhpunitConstraintIsIdenticalString\\Tests\\": "tests/"
39+
}
3940
}
40-
}
4141
}

dev-tools/composer.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"require": {
3-
"php": "^7.2"
4-
},
5-
"conflict": {
6-
"hhvm": "*"
7-
},
8-
"require-dev": {
9-
"friendsofphp/php-cs-fixer": "^2.11",
10-
"localheinz/composer-normalize": "^0.6.0",
11-
"maglnet/composer-require-checker": "^0.1.6",
12-
"mi-schi/phpmd-extension": "^4.2.1",
13-
"phpmd/phpmd": "^2.6.0"
14-
},
15-
"config": {
16-
"optimize-autoloader": true,
17-
"sort-packages": true
18-
}
2+
"require": {
3+
"php": "^7.3"
4+
},
5+
"conflict": {
6+
"hhvm": "*"
7+
},
8+
"require-dev": {
9+
"friendsofphp/php-cs-fixer": "^2.14",
10+
"localheinz/composer-normalize": "^1.1",
11+
"maglnet/composer-require-checker": "^2.0",
12+
"mi-schi/phpmd-extension": "^4.3",
13+
"phpmd/phpmd": "^2.6"
14+
},
15+
"config": {
16+
"optimize-autoloader": true,
17+
"sort-packages": true
18+
}
1919
}

0 commit comments

Comments
 (0)