Showing 61 of 65 total issues
Function create
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function create($params, $model)
{
// nombre de archivo
$file = APP_PATH.'models';
- 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
Function ifRouted
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function ifRouted(string $url): string
{
$routes = Config::get('routes.routes');
// Si existe una ruta exacta la devuelve
- 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
Function dispatch
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function dispatch($argv)
{
// Elimino el nombre de archivo del array de argumentos
array_shift($argv);
- 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
Function generate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected static function generate($controller)
{
// Registra la autocarga de helpers
spl_autoload_register('kumbia_autoload_helper', true, true);
// Mapea los atributos del controller en el scope
- 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 select
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function select($field, $data, $attrs = '', $value = null, $blank = '', $itemId = 'id', $show = '')
Method linkConfirm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function linkConfirm($action, $text, $update, $confirm, $class = '', $attrs = '')
Method select
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function select($field, $data, $update, $action, $class = '', $attrs = '')
Function init
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static public function init(Controller $controller) {
$content = $_SERVER['CONTENT_TYPE'] ?? 'text/html';
/**
* Verifico el formato de entrada
*/
- 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 tag
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static function tag($tag, $field, $attrs = '', $value = '', $extra = '', $close = true)
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($auth, $extra_args)
{
if (!extension_loaded("radius")) {
throw new KumbiaException("Debe cargar la extensión de php llamada radius");
- 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
Function data
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function data(array $data, array $fields, $filterAll = '') {
$filtered = array();//datos filtrados a devolver.
foreach ($fields as $index => $filters) {
if (is_numeric($index) && array_key_exists($filters, $data)) {
//si el indice es numerico, no queremos usar filtro para ese campo
- 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 linkActionConfirm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function linkActionConfirm($action, $text, $update, $confirm, $class = '', $attrs = '')
Function delete
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function delete($params, $controller)
{
// path limpio al controlador
$clean_path = trim($controller, '/');
- 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
Function getParams
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getParams($params)
{
$data = [];
foreach ($params as $p) {
if (is_string($p)) {
- 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
Function getField
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. 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
Function partial
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function partial($partial, $__time = '', $params = null, $group = 'kumbia.partials')
{
if (PRODUCTION && $__time && !Cache::driver()->start($__time, $partial, $group)) {
return;
}
- 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
Function authenticate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function authenticate()
{
$this->resource = @fopen($this->filename, "r");
if ($this->resource === false) {
throw new KumbiaException("No existe o no se puede cargar el archivo '{$this->filename}'");
- 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 dbSelect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function dbSelect($field, $show = null, $data = null, $blank = 'Seleccione', $attrs = '', $value = null)
Method linkAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function linkAction($action, $text, $update, $class = '', $attrs = '')
Method form
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function form($update, $action = '', $class = '', $method = 'post', $attrs = '')