core/extensions/helpers/form.php
Form
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Form
{
/**
* Utilizado para generar los id de los radio button,
* lleva un conteo interno.
Method select
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function select($field, $data, $attrs = '', $value = null, $blank = '', $itemId = 'id', $show = '')
Method dbSelect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function dbSelect($field, $show = null, $data = null, $blank = 'Seleccione', $attrs = '', $value = null)
Method tag
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected static function tag($tag, $field, $attrs = '', $value = '', $extra = '', $close = true)
Function getField
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function getField($field, $value = null, $is_check = false, $filter = true, $check = false)
{
// Obtiene considerando el patrĂ³n de formato form.field
$formField = explode('.', $field, 2);
[$id, $name] = self::fieldName($formField);
- 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 getField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function getField($field, $value = null, $is_check = false, $filter = true, $check = false)