Showing 160 of 160 total issues
Function execute_api
has a Cognitive Complexity of 316 (exceeds 5 allowed). Consider refactoring. Open
public function execute_api($output = 'JSON')
{
// DB::enableQueryLog();
- 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
File CBController.php
has 1424 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php namespace crocodicstudio\crudbooster\controllers;
error_reporting(E_ALL ^ E_NOTICE);
Function getIndex
has a Cognitive Complexity of 180 (exceeds 5 allowed). Consider refactoring. Open
public function getIndex()
{
$this->cbLoader();
$module = CRUDBooster::getCurrentModule();
- 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
File CRUDBooster.php
has 1377 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace crocodicstudio\crudbooster\helpers;
use Cache;
Method getIcons
has 696 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getIcons() {
return [
"glass",
"music",
"search",
Method execute_api
has 457 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute_api($output = 'JSON')
{
// DB::enableQueryLog();
Method getIndex
has 346 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getIndex()
{
$this->cbLoader();
$module = CRUDBooster::getCurrentModule();
Function input_assignment
has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring. Open
public function input_assignment($id = null)
{
$hide_form = (request('hide_form')) ? unserialize(request('hide_form')) : [];
- 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
File Fontawesome.php
has 702 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace crocodicstudio\crudbooster\fonts;
class Fontawesome {
public static function getIcons() {
Function validation
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
public function validation($id = null)
{
$request_all = Request::all();
$array_input = [];
- 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
CRUDBooster
has 73 functions (exceeds 20 allowed). Consider refactoring. Open
class CRUDBooster
{
/**
* Comma-delimited data output from the child table
*/
File ModulsController.php
has 617 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php namespace crocodicstudio\crudbooster\controllers;
use CRUDBooster;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Excel;
Method generateController
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function generateController($table, $name = null)
{
$exception = ['id', 'created_at', 'updated_at', 'deleted_at'];
$image_candidate = explode(',', config('crudbooster.IMAGE_FIELDS_CANDIDATE'));
Function postEditSave
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
public function postEditSave($id)
{
$this->cbLoader();
$row = DB::table($this->table)->where($this->primary_key, $id)->first();
- 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 generateController
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public static function generateController($table, $name = null)
{
$exception = ['id', 'created_at', 'updated_at', 'deleted_at'];
$image_candidate = explode(',', config('crudbooster.IMAGE_FIELDS_CANDIDATE'));
- 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 postAddSave
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
public function postAddSave()
{
$this->cbLoader();
if (! CRUDBooster::isCreate() && $this->global_privilege == false) {
CRUDBooster::insertLog(cbLang('log_try_add_save', [
- 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
File ApiController.php
has 546 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php namespace crocodicstudio\crudbooster\controllers;
use CRUDBooster;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
Function postDoImportChunk
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function postDoImportChunk()
{
$this->cbLoader();
$file_md5 = md5(request('file'));
- 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 cbInit
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function cbInit()
{
$this->table = "cms_menus";
$this->primary_key = "id";
$this->title_field = "name";
Method cbInit
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function cbInit()
{
$this->table = 'cms_moduls';
$this->primary_key = 'id';
$this->title_field = "name";