Skip to content

Commit c4a8c7f

Browse files
committed
Update phpunit/php-cs-fixer.
1 parent c8a81e3 commit c4a8c7f

6 files changed

Lines changed: 33 additions & 33 deletions

File tree

.gitattributes

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Ignore all test and documentation with “export-ignore”.
2-
.gitattributes export-ignore
3-
.gitignore export-ignore
4-
.php_cs export-ignore
5-
.github export-ignore
6-
README.md export-ignore
7-
phpunit.xml export-ignore
8-
phpstan.neon export-ignore
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
/.php_cs export-ignore
5+
/.github export-ignore
6+
/README.md export-ignore
7+
/phpunit.xml export-ignore
8+
/phpstan.neon export-ignore
99
/tests export-ignore
1010
/example export-ignore

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/vendor/
2-
/.php_cs.cache
2+
/.php-cs-fixer.cache
33
/.phpunit.result.cache
44
/tests-report-html/
55
/composer.lock

.php-cs-fixer.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('vendor')
5+
->in(__DIR__)
6+
;
7+
8+
$config = new PhpCsFixer\Config();
9+
return $config->setRules([
10+
'@PSR12' => true,
11+
'@PSR12:risky' => true,
12+
'@PhpCsFixer' => true,
13+
'@PhpCsFixer:risky' => true,
14+
'array_syntax' => ['syntax' => 'short'],
15+
'php_unit_test_class_requires_covers' => false,
16+
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
17+
'native_function_invocation' => false,
18+
])
19+
->setFinder($finder)
20+
;

.php_cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
"webmozart/assert": "^1.5"
2525
},
2626
"require-dev": {
27-
"friendsofphp/php-cs-fixer": "^2.15",
27+
"friendsofphp/php-cs-fixer": "^3.0",
2828
"phpstan/phpstan": "^0.12.26",
2929
"phpstan/phpstan-strict-rules": "^0.12",
3030
"phpstan/phpstan-webmozart-assert": "^0.12",
31-
"phpunit/phpunit": "^7.0 || ^8.0"
31+
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
3232
},
3333
"config": {
3434
"sort-packages": true

src/Entry.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public function setSummary(?string $summary, ?string $type = null): void
3939

4040
public function setContent(?string $content, ?string $type = null, ?string $src = null): void
4141
{
42-
Assert::true(((null !== $content) && (null === $src)) ||
43-
((null === $content) && (null !== $src)) ||
44-
((null === $content) && (null === $src) && (null === $type)));
42+
Assert::true(((null !== $content) && (null === $src))
43+
|| ((null === $content) && (null !== $src))
44+
|| ((null === $content) && (null === $src) && (null === $type)));
4545
if (null !== $src) {
4646
self::assertURL($src);
4747
}

0 commit comments

Comments
 (0)