Skip to content

Commit

Permalink
chore: upgrade php-cs-fixer to last release
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroTroller committed Jun 14, 2023
1 parent cb7dc1f commit 2039e38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static function arrayToString(array $array = null)
if (array_values($array) === $array) {
$string .= implode(', ', array_map([self::class, 'valueToString'], $array));
} else {
$string .= implode(', ', array_map(fn ($value, $key) => '\''.$key.'\' => '.static::valueToString($value), $array, array_keys($array)));
$string .= implode(', ', array_map(fn ($value, $key) => '\''.$key.'\' => '.self::valueToString($value), $array, array_keys($array)));
}

$string .= ' ]';
Expand All @@ -34,7 +34,7 @@ private static function valueToString($value = null)
}

if (is_array($value)) {
return static::arrayToString($value);
return self::arrayToString($value);
}

if (null === $value) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"php": "^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.15",
"friendsofphp/php-cs-fixer": "^3.17",
"phpspec/phpspec": "^7.0",
"sebastian/diff": "^4.0",
"twig/twig": "^3.3",
Expand Down
3 changes: 1 addition & 2 deletions src/PedroTroller/CS/Fixer/TokensAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ public function getReturnedType($index)

$next = $optionnal
? $this->tokens->getNextMeaningfulToken($next)
: $next
;
: $next;

do {
$return = $this->tokens[$next]->getContent();
Expand Down

0 comments on commit 2039e38

Please sign in to comment.