Retorna se o tipo do documento é CPF ou CNPJ ou Documento

@return string
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';
    }
701366
public function phpdocSummary()
    {
        $content = $this->phpdocContent();
        if (!$content) {
            return UNDEFINED;
        }
        $lines = preg_split('/(\n|\r\n)/', $content);
        $summary = '';
        foreach ($lines as $line) {
            $summary .= $line . "\n";
            if ($line === '' || substr($line, -1) === '.') {
                return trim($summary);
            }
        }
        $summary = trim($summary);
        if ($summary === '') {
            return UNDEFINED;
        }

        return $summary;
    }
925556
public function getIBPTProd(
        $cnpj = '',
        $tokenIBPT = '',
        $ncm = '',
        $siglaUF = '',
        $exTarif = '0'
    ) {
        $url = "http://iws.ibpt.org.br/api/Produtos?token=$tokenIBPT&cnpj=$cnpj&codigo=$ncm&uf=$siglaUF&ex=$exTarif";
        $resposta = $this->zCommCurl($url, '', [], 80);
        $retorno = str_replace("\r\n", '|', $resposta);
        $aResp = explode('||', $retorno);
        if (! empty($aResp[1])) {
            if (substr($aResp[1], 0, 1) == '{') {
                $json = $aResp[1];

                return (array) json_decode($json, true);
            }
        }

        return [];
    }
815419
public function getValidade()
    {
        $this->verificaChaveNula();

        $data = openssl_x509_read($this->chavePub);
        $certData = openssl_x509_parse($data);

        return Carbon::createFromFormat('ymdHis', str_replace('Z', '', $certData['validTo']));
    }
68768
private function note() {return dfc($this, function() {return
		!($n = $this->e()->getNote()) ? '' : df_tag('p', 'note', df_tag('span', [], $n))
	;});}
1290311
public function getEncoded()
    {
        $text = array();
        foreach ($this->listSegmento() as $segmento) {
            $text[] = $segmento->getEncoded();
        }

        return implode(Arquivo::QUEBRA_LINHA, $text);
    }
943993
protected function getEOF() {
    $num = count($this->files);
    $eof = pack(
      'VvvvvVVv',
      0x06054b50,             // Signature
      0x00,                   // Number of this disk
      0x00,                   // Disk where central dir starts
      $num,                   // Number of central dirs on this disk
      $num,                   // Total central dirs
      $this->centralLength,   // Length of central dir.
      $this->localOffset,     // Offset to first centralHeader
      0                       // Comment length
    );

    return $eof;
  }
895052
private function getDocblock()
    {
        $docblock = $this->stmt->getDocComment();

        if ($docblock) {
            $parsed_docblock = DocComment::parse((string)$docblock, null, true);
        } else {
            $parsed_docblock = ['description' => '', 'specials' => []];
        }

        foreach ($this->new_phpdoc_param_types as $param_name => $phpdoc_type) {
            $found_in_params = false;
            $new_param_block = $phpdoc_type . ' ' . '$' . $param_name;

            if (isset($parsed_docblock['specials']['param'])) {
                foreach ($parsed_docblock['specials']['param'] as &$param_block) {
                    $doc_parts = CommentAnalyzer::splitDocLine($param_block);

                    if (($doc_parts[1] ?? null) === '$' . $param_name) {
                        $param_block = $new_param_block;
                        $found_in_params = true;
                        break;
                    }
                }
            }

            if (!$found_in_params) {
                $parsed_docblock['specials']['param'][] = $new_param_block;
            }
        }

        if ($this->new_phpdoc_return_type) {
            $parsed_docblock['specials']['return'] = [
                $this->new_phpdoc_return_type
                    . ($this->return_type_description ? (' ' . $this->return_type_description) : '')
            ];
        }

        if ($this->new_phpdoc_return_type !== $this->new_psalm_return_type && $this->new_psalm_return_type) {
            $parsed_docblock['specials']['psalm-return'] = [$this->new_psalm_return_type];
        }

        return DocComment::render($parsed_docblock, $this->indentation);
    }
1317266
public function getStructure()
    {
        $structure = [];

        $abilities = config('acl.roles');

        // Habilidades registradas
        foreach (Core::getPolicies() as $item) {

            $role       = $item->role;
            $permission = $item->permission;

            if (isset($structure[$role]) == false) {
                $structure[$role] = [
                    'label' => $abilities[$role]['label']
                ];
            }

            if (isset($structure[$role]['permissions']) == false) {
                $structure[$role]['permissions'] = [
                    'create' => null,
                    'read'   => null,
                    'update' => null,
                    'delete' => null,
                ];
            }

            // Não nulos aparecerão no formulário
            // Nulos terão o checkbox ocultado
            $structure[$role]['permissions'][$permission] = '';
        }

        return $structure ?? [];
    }
620486
public static function getDocRoot(): string
    {
        $result = '.';
        $root = Arr::key('DOCUMENT_ROOT', $_SERVER, true);

        if ($root) {
            $result = $root;
        }

        $result = FS::clean($result);
        $result = FS::real($result);

        if (!$result) {
            $result = FS::real('.'); // @codeCoverageIgnore
        }

        return $result;
    }
1102222
public function getNote(): string
    {
        if (preg_match('/^0 @' . Gedcom::REGEX_XREF . '@ NOTE ?(.*(?:\n1 CONT ?.*)*)/', $this->gedcom . $this->pending, $match)) {
            return preg_replace("/\n1 CONT ?/", "\n", $match[1]);
        }

        return '';
    }
772649
public function getCodigoTransmissao()
    {
        $conta = $this->getConta();
        if (strlen($conta) == 9) {
            $conta = substr($conta, 0, 7);
        }

        return Util::formatCnab('9', $this->getAgencia(), 4)
            . Util::formatCnab('9', substr($this->getCodigoCliente(), 0, 7), 8)
            . Util::formatCnab('9', $conta, 8);
    }
325634
protected function getCampoLivre()
    {
        if ($this->campoLivre) {
            return $this->campoLivre;
        }

        $campoLivre = '2';
        $campoLivre .= '1';
        $campoLivre .= Util::numberFormatGeral($this->getCodigoCliente(), 11); //4 digitos da agencia + 7 primeiros digitos pois os ultimos 2 são digitos verificadores
        $campoLivre .= Util::numberFormatGeral($this->getNumero(), 8);
        $campoLivre .= '40';
        $campoLivre .= CalculoDV::banrisulDuploDigito(Util::onlyNumbers($campoLivre));

        return $this->campoLivre = $campoLivre;
    }
930662
public function getSPcert()
    {
        $cert = null;

        if (isset($this->_sp['x509cert']) && !empty($this->_sp['x509cert'])) {
            $cert = $this->_sp['x509cert'];
        } else {
            $certFile = $this->_paths['cert'].'sp.crt';

            if (file_exists($certFile)) {
                $cert = file_get_contents($certFile);
            }
        }
        return $cert;
    }
965499
public static function getLogo()
    {
        // Verificar se foi definido a logo do app
        $file_logo_app = app_path('logo.txt');
        if (file_exists($file_logo_app))
            return file_get_contents($file_logo_app);

        // Logo do framework
        $file_logo = __DIR__ . '/Resources/logo.txt';
        if (file_exists($file_logo))
            return file_get_contents($file_logo);
        return '';
    }
560353
protected function zCleanPubKey()
    {
        //inicializa variavel
        $data = '';
        //carregar a chave publica
        $pubKey = $this->pubKey;
        //carrega o certificado em um array usando o LF como referencia
        $arCert = explode("\n", $pubKey);
        foreach ($arCert as $curData) {
            //remove a tag de inicio e fim do certificado
            if (strncmp($curData, '-----BEGIN CERTIFICATE', 22) != 0 &&
                    strncmp($curData, '-----END CERTIFICATE', 20) != 0) {
                //carrega o resultado numa string
                $data .= trim($curData);
            }
        }

        return $data;
    }
637644
public function getDocument()
    {
        $doc = new Document();
        $doc->setData($this->getSource());
        $hit = $this->getHit();
        unset($hit['_source']);
        unset($hit['_explanation']);
        unset($hit['highlight']);
        unset($hit['_score']);
        $doc->setParams($hit);

        return $doc;
    }