Get the full code line at the bottom of the ESR

@param bool $fillZeros Whether to fill up the code line with leading zeros.
@return string The full code line.
766330
public function getCodeLine($fillZeros = true)
    {
        $referenceNumber = $this->getCompleteReferenceNumber(false, $fillZeros);
        $accountNumber = $this->getAccountDigits();

        if ($this->getWithAmount()) {
            $francs = $this->getAmountFrancs();
            $cents = $this->getAmountCents();
            $francs = str_pad($francs, 8, '0', STR_PAD_LEFT);
            $cents = str_pad($cents, 2, '0', STR_PAD_RIGHT);
            $amountPrefix = '01';
            $amountPart = $francs . $cents;
            $amountCheck = $this->modulo10($amountPrefix . $amountPart);
        } else {
            $amountPrefix = '04';
            $amountPart = '';
            $amountCheck = '2';
        }
        if ($fillZeros) {
            $referenceNumberPart = str_pad($referenceNumber, 27, '0', STR_PAD_LEFT);
        } else {
            $referenceNumberPart = $referenceNumber;
        }
        $accountNumberPart = substr($accountNumber, 0, 2) .
            str_pad(substr($accountNumber, 2), 7, '0', STR_PAD_LEFT);

        if ($this->getNotForPayment()) {
            $amountPrefix = 'XX';
            $amountCheck = 'X';
        }

        $codeLine = sprintf(
            '%s%s%s>%s+ %s>',
            $amountPrefix,
            $amountPart,
            $amountCheck,
            $referenceNumberPart,
            $accountNumberPart
        );

        return $codeLine;
    }
209794
public static function stringLinesLimiter($string, $linesLimit, $removeEmptyLines = false, $stringLengthLimit = 189, $lineStringLengthLimit = 63)
    {
        $lines = explode(PHP_EOL, $string);
        if ($removeEmptyLines) {
            for ($i = 0; $i < count($lines); $i++) {
                $element = trim(self::replaceNewlines($lines[$i], ''));
                if ($element == '') {
                    unset($lines[$i]);
                }
            }
        }

        $stringLinesArray = array();
        $count = $linesLimit;
        $charactersLeft = $stringLengthLimit;

        foreach ($lines as &$line) {
            $line = self::replaceNewlines($line, '');
            if (strlen($line) >= ($count * $lineStringLengthLimit)) {
                $stringLinesArray[] = self::subString($line, $count * $lineStringLengthLimit);
                break;
            }
            $count = $count - 1;
            if (count($lines) > $linesLimit && $count < 1) {
                $stringLinesArray[] = $line . '...';
            } else {
                $stringLinesArray[] = $line;
            }
            if ($count < 1) {
                break;
            }
        }

        $string = implode(PHP_EOL, $stringLinesArray);

        return $string;
    }
800761
protected function getRegex($operators)
    {
        $regexes = [];

        /** @var \Xylemical\Expressions\Operator $operator */
        foreach ($operators as $operator)
        {
            $regexes[] = $operator->getRegex();
        }

        // Add parentheses regexes.
        $regexes[] = '\(';
        $regexes[] = '\)';
        $regexes[] = ',';

        // Generate the full regex.
        return '#(?:' . implode('|', $regexes) . ')#i';
    }
16821
public function getLine($mode = self::RETURN_EVERY_LINE)
    {
        $line = parent::getLine($mode);
        if ($line === null) { return null; }
        $parsed = str_getcsv($line, $this->delimiter, $this->enclosure, $this->escape);
        if ($mode === self::SKIP_EMPTY_LINES && self::isEmpty($parsed)) {
            return $this->getLine($mode);
        }
        return $parsed;
    }
397100
public function fullByCode(string $code)
    {
        $all = $this->full($code);

        return $this->checkAndReturnResult($all);
    }
590183
public function fullMessages($glue = null)
    {
        $fullMessages = array();
        
        foreach ($this->errors as $attr => $errors) {
            foreach ($errors as $msg) {
                if ($attr == self::BASE_ERRORS_INDEX)
                    $fullMessages[] = $msg;
                else
                    $fullMessages[] = $this->_propper_attr($attr) . ' ' . $msg;
            }
        }
        
        if ($glue !== null)
            return implode($glue, $fullMessages);
        else
            return $fullMessages;
    }
160173
protected function getFillsSectionContent()
    {
        // Excel reserves two default fills
        $fillsCount = count($this->registeredFills) + 2;
        $content = sprintf('<fills count="%d">', $fillsCount);

        $content .= '<fill><patternFill patternType="none"/></fill>';
        $content .= '<fill><patternFill patternType="gray125"/></fill>';

        // The other fills are actually registered by setting a background color
        foreach ($this->registeredFills as $styleId) {
            /** @var Style $style */
            $style = $this->styleIdToStyleMappingTable[$styleId];

            $backgroundColor = $style->getBackgroundColor();
            $content .= sprintf(
                '<fill><patternFill patternType="solid"><fgColor rgb="%s"/></patternFill></fill>',
                $backgroundColor
            );
        }

        $content .= '</fills>';

        return $content;
    }
1239428
public function getAllElements()
    {
        $paymentSlipData = $this->paymentSlipData;
        $formatted = $this->getReferenceNrFormatted();
        $fillZeros = $this->getReferenceNrFillZeros();

        $elements = parent::getAllElements();

        // Place left reference number
        if ($this->getDisplayReferenceNr()) {
            $lines = [
                $paymentSlipData->getCompleteReferenceNumber(
                    $formatted,
                    $fillZeros
                )
            ];
            $elements['referenceNumberLeft'] = [
                'lines' => $lines,
            'attributes' => $this->getReferenceNumberLeftAttr()
            ];

            // Place right reference number
            // Reuse lines from above
            $elements['referenceNumberRight'] = [
                'lines' => $lines,
                'attributes' => $this->getReferenceNumberRightAttr()
            ];
        }

        // Place code line
        if ($this->getDisplayCodeLine()) {
            $lines = [
                $paymentSlipData->getCodeLine($fillZeros)];
            $elements['codeLine'] = [
                'lines' => $lines,
                'attributes' => $this->getCodeLineAttr()
            ];
        }

        return $elements;
    }
901795
public function getLine($glue = ', ')
    {
        if ($address = $this->getArray())
            return implode($glue, array_filter($address));

        return null;
    }
1225321
public function getFullName()
    {
        // TODO make it better
        if (is_null($this->parent)) {
            return $this->getName();
        }

        return (!is_null($this->parent->getFullName()) ? ($this->parent->getFullName() . ':') : '') . $this->getName();
    }
722117
public function getSearchShowResultsOfInitialEmptyQuery($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.showResultsOfInitialEmptyQuery', $defaultIfEmpty);
        return $this->getBool($result);
    }
387980
public function getMaxLineLength($lines)
    {
        if (!is_array($lines)) {
            $lines = explode("\n", $lines);
        }
        $lineLength = 0;
        // find the longest line
        foreach ($lines as $line) {
            $currentLineLength = strlen($line);
            if ($currentLineLength > $lineLength) {
                $lineLength = $currentLineLength;
            }
        }
        return $lineLength;
    }
1076018
private function getFullName(array $params): string
    {
        if (isset($params['full_name'])) {
            return $this->get($params, 'full_name', '');
        }

        return trim(sprintf('%s %s', $this->get($params, 'first', ''), $this->get($params, 'last', '')));
    }
608247
public function getCompleteChar(): string
    {
        if (null === $this->completeChar) {
            return $this->maxSteps ? '=' : $this->completeChar;
        }

        return $this->completeChar;
    }
557680
public function get($max_lines = 0)
    {
        //if $max_lines is set to 0, then get all the data

        $data = [];

        if ($max_lines > 0) {
            $line_count = 0;
        } else {
            $line_count = -1;
        } // so loop limit is ignored

        while ($line_count < $max_lines && false !== ($row = fgetcsv($this->fp, $this->length, $this->delimiter))) {
            if ($this->parse_header) {
                $row_new = null;
                foreach ($this->header as $i => $heading_i) {
                    $row_new[$heading_i] = $row[$i];
                }
                $data[] = $row_new;
            } else {
                $data[] = $row;
            }

            if ($max_lines > 0) {
                ++$line_count;
            }
        }

        if (1 === $max_lines && isset($data[0])) {
            return $data[0];
        }

        return $data;
    }
167381
public function getFullUri()
    {
        $queryString = '';

        $params = array();
        if ($this->hasQuery()) {
            $params[] = $this->getQueryParam();
        }

        if ($this->hasOrderBy()) {
            $params[] = $this->getOrderByParam();
        }

        if ($this->hasSummarizeBy()) {
            $params[] = 'summarize-by=' . $this->getSummarizeBy();
        }

        if ($this->hasOffset()) {
            $params[] = 'offset=' . $this->getOffset();
        }

        if ($this->hasLimit()) {
            $params[] = 'limit=' . $this->getLimit();
        }

        if ($this->hasIncludeTotal()) {
            $params[] = 'include-total=' . $this->getIncludeTotalAsString();
        }

        if (!empty($params)) {
            $queryString = '?' . implode('&', $params);
        }

        return '/' . ltrim($this->getUri(), '/') . $queryString;
    }
1073897
protected function _getRateLimitInfo($headers)
  {
    if (! isset($headers['x-rate-limit-limit'])) {
      return null;
    }
    $rate = [
      'limit'     => $headers['x-rate-limit-limit'],
      'remaining' => $headers['x-rate-limit-remaining'],
      'reset'     => $headers['x-rate-limit-reset']
    ];
    if ($this->_return_format === CODEBIRD_RETURNFORMAT_OBJECT) {
      return (object) $rate;
    }
    return $rate;
  }