Skip to content

Commit

Permalink
Merge pull request #20 from kellerkinderDE/feature/fix-custom-fixers
Browse files Browse the repository at this point in the history
[NOTICKET] correct custom fixers for php8
  • Loading branch information
jochenmanz authored Oct 8, 2021
2 parents 086c9ec + a77275e commit 1092af3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Fixer/AutomaticCommentsFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
$content
);

$tokens[$index] = new Token($content);
$tokens[$index] = new Token([
0 => $token->getId(),
1 => $content,
]);
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/Fixer/MultiToSingleLineAnnotationFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
continue;
}

$tokens[$index] = new Token($this->collapseComment('var', $token));
$tokens[$index] = new Token([
0 => $token->getId(),
1 => $this->collapseComment('var', $token),
]);
}
}

Expand Down

0 comments on commit 1092af3

Please sign in to comment.