public function fix(\SplFileInfo $file, Tokens $tokens)
{
foreach ($tokens as $token) {
if (!$token->isGivenKind(T_DOC_COMMENT)) {
continue;
}
$doc = new DocBlock($token->getContent());
$end = $this->findShortDescriptionEnd($doc->getLines());
if (null !== $end) {
$line = $doc->getLine($end);
$content = rtrim($line->getContent());
if (!$this->isCorrectlyFormatted($content)) {
$line->setContent($content . '.' . $this->whitespacesConfig->getLineEnding());
$token->setContent($doc->getContent());
}
}
}
}