Cake\Shell\Task\ExtractTask::_markerError PHP Method

_markerError() protected method

Indicate an invalid marker on a processed file
protected _markerError ( string $file, integer $line, string $marker, integer $count ) : void
$file string File where invalid marker resides
$line integer Line number
$marker string Marker found
$count integer Count
return void
    protected function _markerError($file, $line, $marker, $count)
    {
        $this->err(sprintf("Invalid marker content in %s:%s\n* %s(", $file, $line, $marker));
        $count += 2;
        $tokenCount = count($this->_tokens);
        $parenthesis = 1;
        while ($tokenCount - $count > 0 && $parenthesis) {
            if (is_array($this->_tokens[$count])) {
                $this->err($this->_tokens[$count][1], false);
            } else {
                $this->err($this->_tokens[$count], false);
                if ($this->_tokens[$count] === '(') {
                    $parenthesis++;
                }
                if ($this->_tokens[$count] === ')') {
                    $parenthesis--;
                }
            }
            $count++;
        }
        $this->err("\n", true);
    }