Skip to content

Commit 6aa3315

Browse files
committed
Update to PHP CS Fixer 2.12.3
1 parent 04b051b commit 6aa3315

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"php": "^7.1",
1818
"ext-json": "*",
1919
"ext-tokenizer": "*",
20-
"friendsofphp/php-cs-fixer": "^2.12"
20+
"friendsofphp/php-cs-fixer": "^2.12.3"
2121
},
2222
"require-dev": {
2323
"kubawerlos/composer-json-fixer": "^2.1",

src/Fixer/ImplodeCallFixer.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,7 @@ public function fix(\SplFileInfo $file, Tokens $tokens): void
4040
$functionsAnalyzer = new FunctionsAnalyzer();
4141

4242
foreach ($tokens as $index => $token) {
43-
if (!$functionsAnalyzer->isGlobalFunctionIndex($tokens, $index)) {
44-
continue;
45-
}
46-
47-
// Temporary: fix until https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3895 is done
48-
$prevIndex = $tokens->getPrevMeaningfulToken($index);
49-
$nextIndex = $tokens->getNextMeaningfulToken($index);
50-
if ($tokens[$prevIndex]->isGivenKind(T_FUNCTION) || !$tokens[$nextIndex]->equals('(')) {
43+
if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
5144
continue;
5245
}
5346

0 commit comments

Comments
 (0)