public function fix(\SplFileInfo $file, Tokens $tokens)
{
foreach ($tokens as $token) {
if (!$token->isGivenKind(T_DOC_COMMENT)) {
continue;
}
$content = $token->getContent();
// move param to start, return to end, leave throws in the middle
$content = $this->moveParamAnnotations($content);
// we're parsing the content again to make sure the internal
// state of the dockblock is correct after the modifications
$content = $this->moveReturnAnnotations($content);
// persist the content at the end
$token->setContent($content);
}
}