public function convertSqlToJob(SQLTokenIterator $tokens) { $statement = null; $tokens->seekTokenNum(SqlToken::T_ROLLBACK()); if ($tokens->getCurrentTokenNumber() === SqlToken::T_ROLLBACK()) { $statement = new RollbackStatement(); } else { throw new MalformedSqlException("Tried to parse ROLLBACK statement when token-iterator does not point to T_ROLLBACK!", $tokens); } return $statement; }