Eduardokum\LaravelBoleto\Boleto\Pessoa::getTipoDocumento PHP Method

getTipoDocumento() public method

Retorna se o tipo do documento é CPF ou CNPJ ou Documento
public getTipoDocumento ( ) : string
return string
    public function getTipoDocumento()
    {
        $cpf_cnpj = Util::onlyNumbers($this->documento);
        if (strlen($cpf_cnpj) == 11) {
            return 'CPF';
        } else {
            if (strlen($cpf_cnpj) == 14) {
                return 'CNPJ';
            }
        }
        return 'Documento';
    }