public function fix(\SplFileInfo $file, Tokens $tokens)
{
/** @var Token $token */
foreach ($tokens as $index => $token) {
if ($token->isGivenKind(T_DOC_COMMENT)) {
$token->setContent($this->fixTokenContent($token->getContent()));
continue;
}
if (!$token->isGivenKind(T_COMMENT)) {
continue;
}
$content = $token->getContent();
$fixedContent = $this->fixTokenContent($content);
if ($content !== $fixedContent) {
$tokens->overrideAt($index, array(T_DOC_COMMENT, $fixedContent));
}
}
}