Skip to content

Commit

Permalink
Add fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Apr 22, 2024
1 parent 603d593 commit 3039103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Fixer/PhpUnit/PhpUnitAttributesFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,13 @@ private static function fixRequires(Tokens $tokens, int $index, Annotation $anno
new Token([T_WHITESPACE, ' ']),
self::createEscapedStringToken($method),
];
} elseif ('RequiresPhp' === $attributeName && isset($matches[3])) {
$attributeTokens = [self::createEscapedStringToken($matches[2].' '.$matches[3])];
} else {
$attributeTokens = [self::createEscapedStringToken($matches[2])];
}

if (isset($matches[3])) {
if (isset($matches[3]) && 'RequiresPhp' !== $attributeName) {
$attributeTokens[] = new Token(',');
$attributeTokens[] = new Token([T_WHITESPACE, ' ']);
$attributeTokens[] = self::createEscapedStringToken($matches[3]);
Expand Down

0 comments on commit 3039103

Please sign in to comment.