Skip to content

Commit 1cd98f0

Browse files
author
Marius Balčytis
committed
php-cs-fixer updated to 2.16.3 version
1 parent bab8cb0 commit 1cd98f0

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Semantic Versioning is maintained only for the following:
1111
The fixers themselves can change their behavior on any update.
1212
New fixers could be added with minor releases, this would require changes in configuration if migration mode is used.
1313

14+
## 2.3.0
15+
16+
### Changed
17+
18+
- `php-cs-fixer` is updated to `2.16.3` version, including binary `paysera-php-cs-fixer` that's distributed with this
19+
library.
20+
1421
## 2.2.3
1522

1623
### Removed

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"require-dev": {
1010
"gecko-packages/gecko-php-unit": "^2.0",
1111
"phpunit/phpunit": "^6.0",
12-
"friendsofphp/php-cs-fixer": "2.14.2"
12+
"friendsofphp/php-cs-fixer": "2.16.3"
1313
},
1414
"autoload": {
1515
"psr-4": {
@@ -30,9 +30,11 @@
3030
"bin-dir": "bin"
3131
},
3232
"scripts" : {
33-
"download-phar": [
34-
"./download-phar.sh"
35-
]
33+
"download-phar": "./download-phar.sh",
34+
"phpunit": "phpunit",
35+
"fix-cs": "./paysera-php-cs-fixer fix",
36+
"test-cs": "./paysera-php-cs-fixer fix --dry-run -v",
37+
"test": ["@phpunit", "@test-cs"]
3638
},
3739
"bin": [
3840
"paysera-php-cs-fixer"

download-phar.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

3-
curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.14.2/php-cs-fixer.phar -o paysera-php-cs-fixer
3+
curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.3/php-cs-fixer.phar -o paysera-php-cs-fixer
44
chmod +x paysera-php-cs-fixer

paysera-php-cs-fixer

117 KB
Binary file not shown.

src/Fixer/PhpBasic/Comment/PhpDocContentsFixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private function validateDocBlockParameters(
140140
// Collect parameters
141141
for ($i = $parenthesesStartIndex; $i < $parenthesesEndIndex; $i++) {
142142
if ($tokens[$i]->isGivenKind(T_VARIABLE)) {
143-
$parameter = null;
143+
$parameter = [];
144144
$previousTokenIndex = $tokens->getPrevMeaningfulToken($i);
145145
if ($tokens[$previousTokenIndex]->isGivenKind(T_STRING)) {
146146
$index = $previousTokenIndex;
@@ -149,7 +149,7 @@ private function validateDocBlockParameters(
149149
&& !$tokens[$index]->equals(',')
150150
&& !$tokens[$index]->isWhitespace()
151151
) {
152-
$parameter['Typecast'] = $tokens[$index]->getContent() . $parameter['Typecast'];
152+
$parameter['Typecast'] = $tokens[$index]->getContent() . ($parameter['Typecast'] ?? '');
153153
$index--;
154154
}
155155
} elseif (in_array($tokens[$previousTokenIndex]->getContent(), $this->scalarTypes, true)) {

0 commit comments

Comments
 (0)