public function fix(\SplFileInfo $file, Tokens $tokens)
{
static $searchSequence = array(array(T_VARIABLE, '$this'), array(T_OBJECT_OPERATOR, '->'), array(T_STRING));
$index = 1;
$candidate = $tokens->findSequence($searchSequence, $index);
while (null !== $candidate) {
end($candidate);
$index = $this->getAssertCandidate($tokens, key($candidate));
if (is_array($index)) {
$index = $this->fixAssert($tokens, $index);
}
++$index;
$candidate = $tokens->findSequence($searchSequence, $index);
}
}