public function fix(\SplFileInfo $file, Tokens $tokens) { $callBack = $this->callBack; foreach ($tokens as $index => $token) { if ($token->isGivenKind($this->candidateTokenType)) { $this->{$callBack}($tokens, $index); } } }