Skip to content

Commit 6304938

Browse files
committed
Update PHP-CS-Fixer and config
1 parent 5a364cf commit 6304938

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

.php_cs.dist

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,15 @@ $finder = PhpCsFixer\Finder::create()
88
;
99

1010
return PhpCsFixer\Config::create()
11+
->setFinder($finder)
1112
->setRules([
1213
'@Symfony' => true,
13-
'binary_operator_spaces' => [
14-
'align_equals' => false,
15-
'align_double_arrow' => true,
16-
],
1714
'array_syntax' => ['syntax' => 'short'],
18-
'cast_spaces' => false,
1915
'linebreak_after_opening_tag' => true,
2016
'ordered_imports' => true,
21-
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
17+
'phpdoc_add_missing_param_annotation' => true,
2218
'phpdoc_order' => true,
2319
'yoda_style' => null,
20+
'no_superfluous_phpdoc_tags' => false,
2421
])
25-
->setFinder($finder)
2622
;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"psr/http-message": "^1.0"
3030
},
3131
"require-dev": {
32-
"friendsofphp/php-cs-fixer": "^2.14",
32+
"friendsofphp/php-cs-fixer": "^2.16",
3333
"php-http/guzzle6-adapter": "^2.0",
3434
"phpunit/phpunit": "^7.0|^8.0"
3535
},

src/ResponseBuilder.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function getMockStatusForRequest(RequestInterface $request): int
107107
try {
108108
$file = $this->getMockFilePathForRequest($request, self::TYPE_STATUS);
109109

110-
return (int)file_get_contents($file);
110+
return (int) file_get_contents($file);
111111
} catch (MockNotFoundException $e) {
112112
return 200;
113113
}
@@ -168,10 +168,7 @@ protected function getMockFilePathForRequest(RequestInterface $request, string $
168168
}
169169

170170
if (null === $file) {
171-
throw new MockNotFoundException(
172-
'No fixture file found. Check possiblePaths for files that can be used.',
173-
$possiblePaths
174-
);
171+
throw new MockNotFoundException('No fixture file found. Check possiblePaths for files that can be used.', $possiblePaths);
175172
}
176173

177174
if (realpath(\dirname($file)) !== \dirname($file)) {
@@ -263,7 +260,7 @@ protected function getQueryFromRequest(RequestInterface $request, $replacement =
263260
sort($parts);
264261
$query = implode('&', $parts);
265262

266-
return (string)Stringy::create(str_replace(['\\', '/', '?', ':', '*', '"', '>', '<', '|'], $replacement, $query))
263+
return (string) Stringy::create(str_replace(['\\', '/', '?', ':', '*', '"', '>', '<', '|'], $replacement, $query))
267264
->toAscii()
268265
->delimit($replacement)
269266
->removeLeft($replacement)

0 commit comments

Comments
 (0)