Brunomm/br_boleto

View on GitHub

Showing 55 of 92 total issues

File default_codes.rb has 1308 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module BrBoleto
    module Helper
        module DefaultCodes
            ########################################################################################
            ##############################  ESPÉCIE DO TÍTULO  #####################################
Severity: Major
Found in lib/br_boleto/helper/default_codes.rb - About 3 days to fix

    Method equivalent_codigo_motivo_ocorrencia_A_240 has 546 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    def equivalent_codigo_motivo_ocorrencia_A_240 codigo_movimento_gem
                        #  Código     Padrão para  
                        {# do Banco     a Gem
                            'A00'   =>   'A00',   # Ocorrência aceita
                            '01'    =>   'A01' ,  # Código do Banco Inválido
    Severity: Major
    Found in lib/br_boleto/helper/default_codes.rb - About 2 days to fix

      File itau.rb has 496 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module BrBoleto
          module Conta
              class Itau < BrBoleto::Conta::Base
      
                  # MODALIDADE CARTEIRA:
      Severity: Minor
      Found in lib/br_boleto/conta/itau.rb - About 7 hrs to fix

        Method equivalent_codigo_motivo_ocorrencia_A_400 has 167 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        def equivalent_codigo_motivo_ocorrencia_A_400 codigo_movimento_gem
                            case codigo_movimento_gem
                            when '02'
                                super.merge(
                                    #  Padrão    Código para  
        Severity: Major
        Found in lib/br_boleto/conta/itau.rb - About 6 hrs to fix

          Method equivalent_codigo_movimento_retorno_240 has 165 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          def equivalent_codigo_movimento_retorno_240
                              {
                                  '01'  => '01',  # Solicitação de Impressão de Títulos Confirmada
                                  '02'  => '02',  # Entrada Confirmada
                                  '03'  => '03',  # Entrada Rejeitada
          Severity: Major
          Found in lib/br_boleto/helper/default_codes.rb - About 6 hrs to fix

            Class Santander has 44 methods (exceeds 20 allowed). Consider refactoring.
            Open

                        class Santander < BrBoleto::Remessa::Cnab240::Base
                            def conta_class
                                BrBoleto::Conta::Santander
                            end
            
            
            Severity: Minor
            Found in lib/br_boleto/remessa/cnab240/santander.rb - About 6 hrs to fix

              Method equivalent_codigo_motivo_ocorrencia_B_240 has 126 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              def equivalent_codigo_motivo_ocorrencia_B_240 codigo_movimento_gem
                                  #  Código     Padrão para  
                                  {# do Banco     a Gem
                                      '01'    =>   'B01',  # Tarifa de Extrato de Posição
                                      '02'    =>   'B02',  # Tarifa de Manutenção de Título Vencido
              Severity: Major
              Found in lib/br_boleto/helper/default_codes.rb - About 5 hrs to fix

                Method set_regras_tamanho_e_validations! has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                Open

                        def set_regras_tamanho_e_validations!
                            @conta ||= conta_class.new()
                            @conta.valid_conta_corrente_length   = valid_conta_corrente_length   if "#{valid_conta_corrente_length}".present?
                            @conta.valid_conta_corrente_minimum  = valid_conta_corrente_minimum  if "#{valid_conta_corrente_minimum}".present?
                            @conta.valid_conta_corrente_maximum  = valid_conta_corrente_maximum  if "#{valid_conta_corrente_maximum}".present?
                Severity: Minor
                Found in lib/br_boleto/association/have_conta.rb - About 4 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method equivalent_codigo_motivo_ocorrencia_A_400 has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                def equivalent_codigo_motivo_ocorrencia_A_400 codigo_movimento_gem
                                    case codigo_movimento_gem
                                    when '02'
                                        super.merge(
                                            #  Padrão    Código para  
                Severity: Major
                Found in lib/br_boleto/conta/banco_brasil.rb - About 4 hrs to fix

                  Method equivalent_codigo_motivo_ocorrencia_B_400 has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  def equivalent_codigo_motivo_ocorrencia_B_400 codigo_movimento_gem
                                      super.merge(
                                          #  Padrão    Código para  
                                          {# do Banco    a GEM
                                              '68'   =>   'B16',   # Fornecimento de máquina FAX
                  Severity: Major
                  Found in lib/br_boleto/conta/bradesco.rb - About 3 hrs to fix

                    Class Sicoob has 31 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                                class Sicoob < BrBoleto::Remessa::Cnab240::Base
                                    def conta_class
                                        BrBoleto::Conta::Sicoob
                                    end
                    
                    
                    Severity: Minor
                    Found in lib/br_boleto/remessa/cnab240/sicoob.rb - About 3 hrs to fix

                      Method equivalent_codigo_motivo_ocorrencia_A_400 has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      def equivalent_codigo_motivo_ocorrencia_A_400 codigo_movimento_gem
                                          super.merge(
                                              #  Padrão    Código para  
                                              {# do Banco    a GEM
                                                  '001'  =>  'A08',  # NOSSO NUMERO NAO NUMERICO
                      Severity: Major
                      Found in lib/br_boleto/conta/santander.rb - About 3 hrs to fix

                        Class Pagamento has 29 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                                class Pagamento < BrBoleto::ActiveModelBase
                        
                                    # conté o metodo 'pagador'
                                    # CNAB: 240 e 400
                                    include BrBoleto::HavePagador
                        Severity: Minor
                        Found in lib/br_boleto/remessa/pagamento.rb - About 3 hrs to fix

                          Class Itau has 27 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                                  class Itau < BrBoleto::Conta::Base
                          
                                      # MODALIDADE CARTEIRA:
                                      #      _______________________________________________________________________
                                      #     | Carteira |  Descrição                                                |
                          Severity: Minor
                          Found in lib/br_boleto/conta/itau.rb - About 3 hrs to fix

                            Class Caixa has 25 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                                    class Caixa < BrBoleto::Conta::Base
                                        
                                        # MODALIDADE CARTEIRA
                                        #  Opcoes:
                                        #    14: Cobrança Simples com registro
                            Severity: Minor
                            Found in lib/br_boleto/conta/caixa.rb - About 2 hrs to fix

                              File banco_brasil.rb has 282 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              module BrBoleto
                                  module Conta
                                      class BancoBrasil < BrBoleto::Conta::Base
                              
                                          # MODALIDADE CARTEIRA:
                              Severity: Minor
                              Found in lib/br_boleto/conta/banco_brasil.rb - About 2 hrs to fix

                                Method equivalent_codigo_motivo_ocorrencia_C_240 has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                                def equivalent_codigo_motivo_ocorrencia_C_240 codigo_movimento_gem
                                                    #  Código     Padrão para  
                                                    {# do Banco     a Gem
                                                        '01'    =>   'C01',  # Por Saldo
                                                        '02'    =>   'C02',  # Por Conta
                                Severity: Major
                                Found in lib/br_boleto/helper/default_codes.rb - About 2 hrs to fix

                                  Class Itau has 24 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                              class Itau < BrBoleto::Remessa::Cnab240::Base
                                                  def conta_class
                                                      BrBoleto::Conta::Itau
                                                  end
                                  
                                  
                                  Severity: Minor
                                  Found in lib/br_boleto/remessa/cnab240/itau.rb - About 2 hrs to fix

                                    Class Santander has 24 methods (exceeds 20 allowed). Consider refactoring.
                                    Open

                                            class Santander < BrBoleto::Conta::Base
                                    
                                                # MODALIDADE CARTEIRA:
                                                #   ___________________________________________
                                                #  | Carteira | Descrição                     | 
                                    Severity: Minor
                                    Found in lib/br_boleto/conta/santander.rb - About 2 hrs to fix

                                      Method equivalent_codigo_ocorrencia_pagador_240 has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                      def equivalent_codigo_ocorrencia_pagador_240
                                                          {
                                                              '0101' => '0101', # Pagador alega que não recebeu a mercadoria 
                                                              '0102' => '0102', # Pagador alega que a mercadoria chegou atrasada 
                                                              '0103' => '0103', # Pagador alega que a mercadoria chegou avariada 
                                      Severity: Major
                                      Found in lib/br_boleto/helper/default_codes.rb - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language