Sync/DiffProvider/Binlog/BinlogParser.php
protected function getNextLine($type = self::LINE_TYPE_ANY)
    {
        do {
            $line = $this->getLine();
            $this->lastLineType = $this->getLineType($line);

            switch ($this->lastLineType) {
                case self::LINE_TYPE_QUERY:
                    $this->lastLine = $this->parseQueryLine($line);
                    break;
                case self::LINE_TYPE_PARAM:
                    $this->lastLine = $this->parseParamLine($line);
                    break;
                case self::LINE_TYPE_META:
                    $this->lastDateTime = $this->parseDateLine($line);
                    $this->lastLogPosition = $this->parsePositionLine($line);
                    break;
                case self::LINE_TYPE_ERROR:
                    throw new \RuntimeException($this->parseErrorLine($line));
                default:
                    // Do nothing.
                    break;
            }
        } while ($type != self::LINE_TYPE_ANY
            && $this->lastLineType != $type
            && $this->getPipe()
            && !feof($this->getPipe())
        );

        return $this->lastLine;
    }
protected function getNextLine($type = self::LINE_TYPE_ANY)
    {
        do {
            $line = $this->getLine();
            $this->lastLineType = $this->getLineType($line);

            switch ($this->lastLineType) {
                case self::LINE_TYPE_QUERY:
                    $this->lastLine = $this->parseQueryLine($line);
                    break;
                case self::LINE_TYPE_PARAM:
                    $this->lastLine = $this->parseParamLine($line);
                    break;
                case self::LINE_TYPE_META:
                    $this->lastDateTime = $this->parseDateLine($line);
                    $this->lastLogPosition = $this->parsePositionLine($line);
                    break;
                case self::LINE_TYPE_ERROR:
                    throw new \RuntimeException($this->parseErrorLine($line));
                default:
                    // Do nothing.
                    break;
            }
        } while ($type != self::LINE_TYPE_ANY
            && $this->lastLineType != $type
            && $this->getPipe()
            && !feof($this->getPipe())
        );

        return $this->lastLine;
    }
@param int $type

@return string
@throws \RuntimeException