@param Polyline $polyline

@return string
769687
public function render(Polyline $polyline)
    {
        if ($polyline->hasStaticOption('locations')) {
            $locations = $polyline->getStaticOption('locations');
        } else {
            $locations = $polyline->getCoordinates();
        }

        return implode('|', array_map(function ($location) {
            return $location instanceof Coordinate ? $this->coordinateRenderer->render($location) : $location;
        }, $locations));
    }
1203397
public function readLine(int $line = 1) : string
    {
        $lines = file($this->_path);

        if($line > count($lines)) {
            throw new LineNumberAboveFileLines($this->_path, $line, count($lines));
        }

        if($line <= 0) {
            $line = 1;
        }

        return $lines[($line - 1)];
    }
1269772
protected function getLineType( Line$line ):string
	{
		$possibleType= self::POSSIBLE_LINE_TYPES;

		for( $i=0; is_array($possibleType); ++$i ){
			$possibleType= $possibleType[$line->getChar($i)]??$possibleType[' '];
		}

		return $possibleType;
	}
1068646
private function getExpectedParameterNames($rawLine)
    {
        $matches = [];
        preg_match_all('/{[a-z]}/', $rawLine, $matches);

        $expectedParameterNames = [];

        foreach ($matches[0] as $parameterNameMatch) {
            $expectedParameterNames[] = substr($parameterNameMatch, 1, strlen($parameterNameMatch) - 2);
        }

        return $expectedParameterNames;
    }
1267315
function line($line = '')
	{
		$value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];

		// Because killer robots like unicorns!
		if ($value === FALSE)
		{
			log_message('error', 'Could not find the language line "'.$line.'"');
		}

		return $value;
	}
545704
public function getLine($mode = self::RETURN_EVERY_LINE)
    {
        $line = parent::getLine($mode);
        if ($line === null) { return null; }
        return $this->splitLine($line);
    }
1371832
protected function getPaddingString($line)
    {
        $length = $this->util->system->width() - $this->lengthWithoutTags($line);

        return str_repeat(' ', $length);
    }
69357
public function parse($line)
    {
        $object = new \stdClass();
        $matches = [];

        foreach ($this->getPatterns() as $key => $pattern) {
            $result = preg_match($pattern, $line, $matches);

            if (1 !== $result) {
                continue;
            }

            $object->$key = $matches[1];
        }

        if (false === property_exists($object, 'date')) {
            throw new FormatException;
        }

        if (false === property_exists($object, 'type')) {
            throw new FormatException;
        }

        return $object;
    }
319505
protected function renderEdges($indent)
    {
        $edgeString = '';
        foreach (array_unique($this->edges) as $edge) {
            $edgeString .= $this->formatLine($edge, $indent);
        }
        return $edgeString;
    }
52473
public static function dumpInline(string $inline): string
    {
        if (false === strpos($inline, '"')) {
            return '"' . $inline . '"';
        }
        if (false === strpos($inline, "'")) {
            return "'$inline'";
        }
        return "<$inline>";
    }
785262
protected static function splitFirstLine($firstLine)
    {
        $parts = preg_split('/\\s/', $firstLine, null, PREG_SPLIT_NO_EMPTY);
        if (count($parts) > 1) {
            return $parts;
        }
        $parts = explode(',', $firstLine);
        if (count($parts) > 1) {
            return $parts;
        }

        return preg_split('/(\\d+\\D*)/', $firstLine, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
    }
419639
public function parse($line)
    {
        $this->error = false;
        $this->currentTextLineContainer = $this->textLineContainers[$this->config->defaultTextLineContainer];
        $firsttag = clone ($this->currentTextLineContainer->tag);

        $this->str = preg_split($this->currentTextLineContainer->pattern, $line, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
        $this->end = count($this->str);

        if ($this->end > 1) {
            $pos = -1;
            $this->_parse($firsttag, $pos);

            return $firsttag->getContent();
        } else {
            $firsttag->addContentString($line);

            return $firsttag->getContent();
        }
    }
847401
public static function parse($line)
    {
        $data = explode(':', $line);
        $filed = $data[0];
        if (isset($data[2])) {
            unset($data[0]);
            $value = implode(':', $data);
        } else {
            $value = $data[1];
        }
        return [rtrim($filed), ltrim($value)];
    }
865795
protected function _parseLine( $line )
    {
        $_result = str_getcsv(
            $line,
            $this->_separator,
            $this->_enclosure,
            EscapeStyle::SLASHED == $this->_escapeStyle ? '\\' : EscapeStyle::DOUBLED == $this->_escapeStyle ? '"' : ''
        );

        return $_result;
    }
619772
public function line($line = '', $params = null)
    {
        if (empty($params)) {
            return parent::line($line);
        }

        //  We have some parameters, sub 'em in or the unicorns will die.
        $line = parent::line($line);

        if ($line !== false) {

            if (is_array($params)) {

                $line = vsprintf($line, $params);

            } else {

                $line = sprintf($line, $params);
            }
        }

        return $line;
    }
1029826
protected function parse_line($line)
    {
        $line = trim($line);
        if (empty($line)) {
            return null;
        }

        $fields = rcube_utils::explode_quoted_string(',', $line);

        // remove quotes if needed
        if (!empty($fields)) {
            foreach ($fields as $idx => $value) {
                if (($len = strlen($value)) > 1 && $value[0] == '"' && $value[$len-1] == '"') {
                    // remove surrounding quotes
                    $value = substr($value, 1, -1);
                    // replace doubled quotes inside the string with single quote
                    $value = str_replace('""', '"', $value);

                    $fields[$idx] = $value;
                }
            }
        }

        return $fields;
    }
995463
public function close( Line$closerLine ):string
	{
		if( isset($this->config['close_by']) && $closerLine->indentLevel==$this->line->indentLevel ){
			foreach( $this->config['close_by'] as $key=>$value ){
				if( $closerLine->pregMatch($key) ){
					return $this->withParam($value);
				}
			}
		}

		if( isset($this->config['closer']) )
			{ return $this->withParam($this->config['closer']); }

		return '';
	}