Showing 64 of 64 total issues
Form
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class Form
{
/**
* Utilizado para generar los id de los radio button,
* lleva un conteo interno.
Upload
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Upload {
/**
* Nombre de archivo subido por método POST
*
Date
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Date {
/**
* Valor interno de fecha
*
Method create
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create($model, $action = '')
{
$model_name = get_class($model);
if (!$action) {
$action = ltrim(Router::get('route'), '/');
Function create
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function create($model, $action = '')
{
$model_name = get_class($model);
if (!$action) {
$action = ltrim(Router::get('route'), '/');
- 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 create
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function create($params, $controller)
{
// nombre de archivo
$file = APP_PATH . 'controllers';
- 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 _validates
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function _validates()
{
// Verifica que se pueda escribir en el directorio
if (!is_writable($this->_path)) {
Flash::error('Error: no se puede escribir en el directorio');
- 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 kumbia_autoload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function kumbia_autoload($class)
{
// Optimizando carga
static $classes;
if ( ! isset($classes)) {
Function rmdir
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function rmdir($dir)
{
// Obtengo los archivos en el directorio a eliminar
if ($files = array_merge(glob("$dir/*"), glob("$dir/.*"))) {
// Elimino cada subdirectorio o archivo
- 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 _validates
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _validates()
{
// Verifica que se pueda escribir en el directorio
if (!is_writable($this->_path)) {
Flash::error('Error: no se puede escribir en el directorio');
Method dispatch
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function dispatch($argv)
{
// Elimino el nombre de archivo del array de argumentos
array_shift($argv);
Method create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create($params, $controller)
{
// nombre de archivo
$file = APP_PATH . 'controllers';
Function exec
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function exec(){
/*Recorrido por todos los campos*/
foreach ($this->rules as $field => $fRule){
$value = self::getValue($this->obj, $field);
/*Regla individual para cada 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
Function bindDatePicker
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
bindDatePicker: function () {
// Selecciona los campos input
let inputs = $("input.js-datepicker");
/**
* Funcion encargada de enlazar el DatePicker a los Input
Function autoload
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
autoload: function () {
let elem = $("[class*='jp-']");
$.each(elem, function (i) {
let el = $(this); //apunta al elemento con clase jp-*
let classes = el.attr("class").split(" ");
Function active_session
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function active_session()
{
$user_hash = md5(serialize($this->extra_args));
$filename = APP_PATH.'temp/cache/'.base64_encode('auth');
if (is_file($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
Function dispatch
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected static function dispatch($cont)
{
// Se ejecutan los filtros initialize y before
if ($cont->k_callback(true) === false) {
return $cont;
- 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 createTagDataProvider
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createTagDataProvider()
{
return array(
array(
'a',
Method dbSelect
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function dbSelect($field, $show, $data, $update, $action, $blank=null, $class = '', $attrs = '')
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"