Showing 234 of 234 total issues
Method lista_params_cor1440_gen
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def lista_params_cor1440_gen
[
:actividad,
:fecha,
:lugar,
Method arregla_tabla_poblacion_de_asistentes_actividad
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def arregla_tabla_poblacion_de_asistentes_actividad(a, resultado)
d = genera_dicc_poblacion_de_asistentes(a)
numdif = 0
- Read upRead up
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 copia
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
def copia
if !params || !params[:actividad_id]
render(inline: "Falta parámetro actividad_id")
return
end
Method gen_descfiltro
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def gen_descfiltro
descfiltro = ""
if filtrofechaini && !filtrofechafin
descfiltro += "Después de " + filtrofechaini.to_s + ". "
end
- Read upRead up
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 identificacion_no_repetida
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def identificacion_no_repetida
if self.asistencia
self.asistencia.each do |a|
next unless a.persona && a.persona.numerodocumento != nil
pr = Msip::Persona
- Read upRead up
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 valor_campo_compuesto
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.valor_campo_compuesto(registro, campo)
p = campo.split(".")
if Mr519Gen::Formulario.where(nombreinterno: p[0]).count == 0
return "No se encontró formulario con nombreinterno #{p[0]}"
end
Method arregla_tabla_poblacion_de_asistentes_actividad
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
def arregla_tabla_poblacion_de_asistentes_actividad(a, resultado)
d = genera_dicc_poblacion_de_asistentes(a)
numdif = 0
Method complementa_importa
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
def complementa_importa(ulteditor_id, datossal, menserror, opciones)
puts "OJO complementa_importa ulteditor_id=#{ulteditor_id}"
if !datossal[:respuestafor] ||
!datossal[:caracterizacion] ||
!datossal[:valorcampo]
Method copia
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def copia
if !params || !params[:actividad_id]
render(inline: "Falta parámetro actividad_id")
return
end
- Read upRead up
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 medir_indicador_efecto
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def medir_indicador_efecto(mind, ind, fini, ffin, resf)
idefs = []
idefs = Cor1440Gen::MindicadorespfController.calcula_listado_ef(
mind.indicadorpf_id, fini, ffin
)
Method medir_indicador_resultado
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def medir_indicador_resultado(mind, ind, fini, ffin, resf)
idacs = []
idacs = calcula_listado_ac(mind.actividadpf_ids, fini, ffin)
if mind.funcionresultado.to_s != "" # Medir con esp de medicionindicadorpf
contexto = {
- Read upRead up
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 medir_indicador_efecto
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def medir_indicador_efecto(mind, ind, fini, ffin, resf)
idefs = []
idefs = Cor1440Gen::MindicadorespfController.calcula_listado_ef(
mind.indicadorpf_id, fini, ffin
)
- Read upRead up
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 relacionadas
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def relacionadas
prob = "".dup
actividadpf_ids = []
proyectofinanciero_ids = []
if params[:proyectofinanciero_ids]
- Read upRead up
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 show
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show
# @actividades = Cor1440Gen::Actividad.all
@actividades = filtra_actividades
@numactividades = @actividades.size
@enctabla = []
Method contar
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
def contar
@contar_actividad = Cor1440Gen::Actividad.all
@contar_pf = Cor1440Gen::Proyectofinanciero.all
@contar_pfid = nil
@contar_ofi = nil
Method medir_indicador
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
def medir_indicador
prob = ""
if params[:finicio] &&
params[:finicio] != "" &&
params[:ffin] &&
Method asegura_camposdinamicos
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def asegura_camposdinamicos(efecto, current_usuario_id)
vfid = [] # ids de formularios que deben presentarse
if efecto.indicadorpf && efecto.indicadorpf.tipoindicador &&
efecto.indicadorpf.tipoindicador.formulario
Method medir_indicador_resultado
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
def medir_indicador_resultado(mind, ind, fini, ffin, resf)
idacs = []
idacs = calcula_listado_ac(mind.actividadpf_ids, fini, ffin)
if mind.funcionresultado.to_s != "" # Medir con esp de medicionindicadorpf
contexto = {
Method ini_asistencia_ram
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ini_asistencia_ram(lids)
"SELECT sub2.* FROM (SELECT sub.*,
(SELECT nombre FROM cor1440_gen_rangoedadac AS red
WHERE id=CASE
WHEN (red.limiteinferior IS NULL OR
Method mindicadorpf_params
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def mindicadorpf_params
params.require(:mindicadorpf).permit(
atributos_form - [
"pmindicadorpf",
:actividadpf,