Retorna o nome e o documento formatados

@return string
192228
public function getNomeDocumento()
    {
        if (!$this->getDocumento()) {
            return $this->getNome();
        } else {
            return $this->getNome() . ' / ' . $this->getTipoDocumento() . ': ' . $this->getDocumento();
        }
    }
1173013
public function format()
    {
        if ($this->format === null) {
            if (null !== ($format = $this->parameters->getParam('format'))) {
                $this->format = $format;
            } else {
                $headers = getallheaders();
                if (isset($headers['Accept'])) {
                    $acceptHeader = $headers['Accept'];
                    
                    $negotiator = new FormatNegotiator();
                    $priorities = ['html', 'json', 'xml', 'js', '*.*'];
                    $this->format = $negotiator->getBestFormat($acceptHeader, $priorities) ?: 'html';
                } else {
                    $this->format = 'html';
                }
            }
        }
        return $this->format;
    }
1091193
protected function getInternalFormatter()
    {
        $formatter = $this->getCustomFormatter(DBDate::ISO_LOCALE, DBDate::ISO_DATE);
        $formatter->setLenient(false);
        return $formatter;
    }
898377
protected function getDocument(): Iterator
    {
        if (70400 > PHP_VERSION_ID && '' === $this->escape) {
            $this->document->setCsvControl($this->delimiter, $this->enclosure);

            return EmptyEscapeParser::parse($this->document);
        }

        $this->document->setFlags(SplFileObject::READ_CSV | SplFileObject::READ_AHEAD | SplFileObject::SKIP_EMPTY);
        $this->document->setCsvControl($this->delimiter, $this->enclosure, $this->escape);
        $this->document->rewind();

        return $this->document;
    }
211013
protected function getFormat()
    {
        if ($this->input->hasOption('format') && $this->input->getOption('format')) {
            return strtolower($this->input->getOption('format'));
        }

        return null;
    }
339977
public function getCodigoCliente()
    {
        if (empty($this->codigoCliente)) {
            $this->codigoCliente = Util::formatCnab('9', $this->getCarteiraNumero(), 4) .
                Util::formatCnab('9', $this->getAgencia(), 5) .
                Util::formatCnab('9', $this->getConta(), 7) .
                Util::formatCnab('9', $this->getContaDv() ?: CalculoDV::bradescoContaCorrente($this->getConta()), 1);
        }

        return $this->codigoCliente;
    }
1204121
public function toString() {
        $documentation = preg_replace_callback(
            '@\r?\n@',
            function ($matches) {
                return $matches[0] . '	 * ';
            },
            trim($this->getDescription())
        );
        if($documentation == '') {
            $documentation = $this->getName();
        }
        $buffer = '
	/**
	 * ' . $documentation . '
';
        foreach($this->getParameters() as $parameter) {
            $buffer .= $parameter->toDocTypeString($this);
        }
        if($this->getName() != '__construct') {
            $buffer .= '	 * @return ' . $this->getReturnType() . '
';
        }
        foreach($this->getThrows() as $throw) {
            $buffer .= '	 * @throws ' . $throw . '
';
        }
        $buffer .= '	 */
	' . ($this->isFinal() ? 'final ' : '') . $this->getAccess() . ' ' . ($this->isStatic() ? 'static ' : '') . 'function ' . $this->getName() . '(';
        foreach($this->getParameters() as $key => $parameter) {
            if($key != 0) {
                $buffer .= ', ';
            }
            if($parameter->isStrictType()) {
                if(!is_null($parameter->getStrictClass())) {
                    $buffer .= $parameter->getStrictClass() . ' ';
                } else {
                    $buffer .= $parameter->getType() . ' ';
                }
            }
            $buffer .= '$' . $parameter->getName();
            if(!is_null($parameter->getDefaultValue())) {
                $buffer .= '=' . $parameter->getDefaultValue();
            }
        }
        $buffer .= ') {
		' . trim($this->getContent()) . '
	}
';
        return $buffer;
    }
174976
public function getText()
    {
        $retorno = '';
        foreach ($this->meta as $key => $value) {
            $retorno .= $this->$key;
        }
        RemessaAbstract::$retorno[] = $retorno;
        if ($this->children) {
            // percorre todos objetos filhos
            foreach ($this->children as $child) {
                $child->getText();
            }
        }
    }
955515
protected function getFieldFormat()
    {
        $format = $this->localeFormat->getPriceFormat();

        $attribute = $this->getFilter()->getAttributeModel();

        $format['pattern']           = (string) $attribute->getDisplayPattern();
        $format['precision']         = (int) $attribute->getDisplayPrecision();
        $format['requiredPrecision'] = (int) $attribute->getDisplayPrecision();
        $format['integerRequired']   = (int) $attribute->getDisplayPrecision() > 0;

        return $format;
    }
138821
public function get_formatted_description() {
        if (!isset($this->definition->description)) {
            return '';
        }
        return format_text($this->definition->description, $this->definition->descriptionformat);
    }
1266752
public function getFormatter()
    {
        $debug = $this->getOption('debug');

        return isset($this->formatters[$debug])
            ? $this->formatters[$debug]
            : $this->initializeFormatter();
    }
665963
private function getResumenPeriodo()
    {
        $resumen = [];
        foreach ($this->detalles as &$d) {
            // si el tipo de boleta no está en el resumen se crea
            if (!isset($resumen[$d['TpoDoc']])) {
                $resumen[$d['TpoDoc']] = [
                    'TpoDoc' => $d['TpoDoc'],
                    'TotAnulado' => false,
                    'TotalesServicio' => [],
                ];
            }
            // si no existe el tipo de servicio se agrega
            if (!isset($resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']])) {
                $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']] = [
                    'TpoServ' => $d['TpoServ'],
                    'PeriodoDevengado' => false,
                    'TotDoc' => false,
                    'TotMntExe' => false,
                    'TotMntNeto' => 0,
                    'TasaIVA' => 0,
                    'TotMntIVA' => 0,
                    'TotMntTotal' => false,
                    'TotMntNoFact' => false,
                    'TotMntPeriodo' => false,
                    'TotSaldoAnt' => false,
                    'TotVlrPagar' => false,
                    'TotTicket' => false,
                ];
            }
            // agregar detalle al resumen
            if (empty($d['Anulado'])) {
                // contabilizar documento
                $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotDoc'] += 1;
                // ir sumando valores
                $vals = ['MntExe'=>'TotMntExe', 'MntTotal'=>'TotMntTotal', 'MntNoFact'=>'TotMntNoFact', 'MntPeriodo'=>'TotMntPeriodo', 'SaldoAnt'=>'TotSaldoAnt', 'VlrPagar'=>'TotVlrPagar', 'TotTicketBoleta'=>'TotTicket'];
                foreach ($vals as $ori => $des) {
                    if ($d[$ori]) {
                        $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']][$des] += $d[$ori];
                    }
                }
                // determinar neto e iva
                $tasa = \sasco\LibreDTE\Sii::getIVA();
                $neto = round(($d['MntTotal'] - $d['MntExe']) / (1 + $tasa/100));
                if ($neto) {
                    $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotMntNeto'] += $neto;
                    $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TasaIVA'] = $tasa;
                    // WARNING: problema por aproximaciones al calcular el NETO e IVA a partir del BRUTO
                    //$resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotMntIVA'] = round($resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotMntNeto'] * ($tasa/100));
                    $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotMntIVA'] = $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotMntTotal'] - $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotMntExe'] - $resumen[$d['TpoDoc']]['TotalesServicio'][$d['TpoServ']]['TotMntNeto'];
                }
            }
            // documento anulado
            else if ($d['Anulado']=='A') {
                $resumen[$d['TpoDoc']]['TotAnulado'] += 1;
            }
        }
        // armar resumen verdadero
        $ResumenPeriodo = ['TotalesPeriodo'=>[]];
        foreach ($resumen as $r) {
            $ResumenPeriodo['TotalesPeriodo'][] = $r;
        }
        // entregar resumen
        return $ResumenPeriodo;
    }
1270215
public function getAvailableFormats()
    {
        try {
            $ret    = array();
            $result = $this->getSoapClient()->GetDocumentFormats();
            if ( isset($result->GetDocumentFormatsResult->string) ) {
                $ret = $result->GetDocumentFormatsResult->string;
                $ret = array_map('strtolower' , $ret);
            }

            return $ret;
        } catch ( SoapException $ex ) {
            throw new StatusException('Error while getting the list of available document formats' , $ex);
        }
    }
17533
public function getTipoDocumento()
    {
        $cpf_cnpj_cei = Util::onlyNumbers($this->documento);

        if (strlen($cpf_cnpj_cei) == 11) {
            return 'CPF';
        } elseif (strlen($cpf_cnpj_cei) == 10) {
            return 'CEI';
        }
        
        return 'CNPJ';
    }
1002309
public function determine_format() {
        return new text_attribute(
            $this->get_name(),
            $this->get_value(),
            $this->get_label(),
            $this->is_disabled()
        );
    }
314550
public function toFormattedString()
    {
        switch (self::$format) {
            case 'full':
                return number_format($this->num, 0, ',', '.') . '-' . $this->vd;
            case 'basic':
                return $this->num.'-'.$this->vd;
            case 'raw':
            default:
                return $this->num.$this->vd;
        }
    }
1264579
protected function getCampoLivre()
    {
        if ($this->campoLivre) {
            return $this->campoLivre;
        }
        $length = strlen($this->getConvenio());
        $nossoNumero = $this->gerarNossoNumero();
        if (strlen($this->getNumero()) > 10) {
            if ($length == 6 && in_array($this->getCarteira(), ['16', '18']) && Util::numberFormatGeral($this->getVariacaoCarteira(), 3) == '017') {
                return $this->campoLivre = Util::numberFormatGeral($this->getConvenio(), 6) . $nossoNumero . '21';
            } else {
                throw new \Exception('Só é possível criar um boleto com mais de 10 dígitos no nosso número quando a carteira é 21 e o convênio possuir 6 dígitos.');
            }
        }
        switch ($length) {
        case 4:
        case 6:
            return $this->campoLivre = $nossoNumero . Util::numberFormatGeral($this->getAgencia(), 4) . Util::numberFormatGeral($this->getConta(), 8) . Util::numberFormatGeral($this->getCarteira(), 2);
        case 7:
            return $this->campoLivre = '000000' . $nossoNumero . Util::numberFormatGeral($this->getCarteira(), 2);
        }
        throw new \Exception('O código do convênio precisa ter 4, 6 ou 7 dígitos!');
    }