Showing 486 of 487 total issues
Function makeUserSpaceModule
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function makeUserSpaceModule($module_database_table_name,
$module_name,
$auto_install = true,
$parse_database_schema = true,
$database_group = false,
- 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
DataGrid
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
class DataGrid extends ContainerAware
{
/**
* Basic search filter
*/
Generic_model
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
class Generic_model extends PEPISCMS_Model implements EntitableInterface, MoveableInterface, AdvancedDataFeedableInterface
{
/**
* Database table name
*
Function _datagrid_format_id_metadata_column
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function _datagrid_format_id_metadata_column($content, &$line)
{
// TODO move HTML out of this method
// $content is usually meta_order_field
- 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 generate
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate($extra_param = false)
{
$output = '';
$page = $this->input->getParam('page');
ModuleGenerator
has 45 functions (exceeds 20 allowed). Consider refactoring. Open
class ModuleGenerator extends ContainerAware
{
/**
* @var \PiotrPolak\PepisCMS\Modulerunner\ModuleLocatorInterface
*/
Function FileManagerUI
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function FileManagerUI(transtlation_map, is_intranet) {
var current_path = '/';
var parent_path = '';
var allowed_extensions = []; // Must be an array
- 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 move
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function move($id, $direction, $table = false, $constraint_field_name = false,
$item_order_field_name = 'item_order', $id_field_name = 'id')
{
// When no table is specified, taking table from the object
if (!$table) {
- 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 __construct
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
$lang_field_prefix = $this->module_name . '_';
File Installer.php
has 400 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function parseCommandFeed
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
protected function parseCommandFeed($contents, $fields_that_can_contain_spaces = array())
{
// Line counter, -1 meaning reading headers
$line_counter = -1;
- 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 model
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function model($model, $name = '', $db_conn = false, $hardfail = true)
{
// Keep this redundancy
$original_model = $model;
$original_name = $name;
- 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 makeTablesBeautiful
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
makeTablesBeautiful: function (handler) {
handler = $(handler);
$("td", handler).hover(
function (event) {
$(this).parent().children("td").addClass("hovered");
CrudFieldDefinitionBuilder
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class CrudFieldDefinitionBuilder
{
const LABEL_KEY = 'label';
const DESCRIPTION_KEY = 'description';
const INPUT_TYPE_KEY = 'input_type';
Function edit
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function edit()
{
$group_id = $this->input->getParam('id');
$add_new = !($group_id > 0);
- 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 Spreadsheet.php
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function mysqldump
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function mysqldump($db_host, $database, $db_user, $db_password, $tables = false, $dump_to_filename = false, $dump_structure = true)
{
if ($dump_to_filename && file_exists($dump_to_filename)) {
return false;
}
- 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 index
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function index($display_view = true)
{
$running_module = $this->getAttribute('running_module');
$definition = $this->getDefinition();
- 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 index
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function index()
{
// Reading history
$query_history = $this->auth->getSessionVariable('sqlconsole_query_history');
if (!$query_history) {
- 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 dologin
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function dologin()
{
$this->_oninit();
$this->load->library('Logger');
- 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"