Function getColumnTable
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function getColumnTable($table, $type = 'list')
{
$this->cbLoader();
$result = [];
- 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 ApiCustomController.php
has 288 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;
Function getDownloadPostman
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function getDownloadPostman()
{
$this->cbLoader();
$data = [];
$data['variables'] = [];
- 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 postSaveApiCustom
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function postSaveApiCustom()
{
$this->cbLoader();
$posts = Request::all();
Method getDownloadPostman
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getDownloadPostman()
{
$this->cbLoader();
$data = [];
$data['variables'] = [];
Method getColumnTable
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getColumnTable($table, $type = 'list')
{
$this->cbLoader();
$result = [];
Function postSaveApiCustom
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function postSaveApiCustom()
{
$this->cbLoader();
$posts = Request::all();
- 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"