Showing 486 of 487 total issues
File AdminCRUDController.php
has 1202 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function generate
has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring. Open
public function generate($extra_param = false)
{
$output = '';
$page = $this->input->getParam('page');
- 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 FormBuilder.php
has 871 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
File DataGrid.php
has 811 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
AdminCRUDController
has 98 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AdminCRUDController extends ModuleAdminController
{
/**
* Database table name used for Generic_model when no feed object is specified
*
Function applyFilters
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
protected function applyFilters(&$output, $filters)
{
$output_new = array();
// Reading the original feed line by line
- 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 parseCSV
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
public function parseCSV($path, $first_row_as_keys = true, $normalize_keys = true, $separator = false)
{
$lines = array();
$keys = array();
if (file_exists($path)) {
- 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
FormBuilder
has 81 functions (exceeds 20 allowed). Consider refactoring. Open
class FormBuilder extends ContainerAware
{
const POST_ID_FIELD_NAME = 'form_builder_id';
/**
File Generic_model.php
has 622 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
File ModuleGenerator.php
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function _fb_callback_on_import
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
public function _fb_callback_on_import($data_array)
{
$this->load->library('Spreadsheet');
$this->load->helper('url');
- 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 render
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
public function render($controller, $method, $language_code = '', $pull_submenu_from_controller = false, $current_module = false)
{
$menu = $this->config->item('menu');
$pull_submenu_from_controller = $this->ensurePulledSumbenuFromControllerIsSet($controller, $pull_submenu_from_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
File User_model.php
has 543 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function generateFilters
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function generateFilters($page = false, $order_by = false, $order = false, $applied_filter_values = -1)
{
$filters_output = '';
if ($applied_filter_values == -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
File PagesAdmin.php
has 515 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function getDefinitionFromTable
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function getDefinitionFromTable($table, $resolve_fk = true)
{
$collumns_a = $this->getTableRawDescription($table);
if (!$collumns_a) {
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
Method index
has 206 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index()
{
$this->load->library('FormBuilder');
$this->load->model('Siteconfig_model');
$definition = array();
File jquery.frontend.js
has 486 lines of code (exceeds 250 allowed). Consider refactoring. Open
var serverOffsetSec = 0; // This should be computed just once
$(document).on('ready', function () {
ppLib.fixLayout();
ppLib.resizeText('#font_resize_bar a');
Function generateCSV
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public function generateCSV($feed, $headers = false, $file_name = false, $send = true, $separator = false, $print_headers = true)
{
if (!$separator) {
$separator = ',';
}
- 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 generateExcel
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public function generateExcel($feed, $headers = false, $file_name = false, $send = true, $print_headers = true, $excel_type = Spreadsheet::EXCEL_XLS)
{
if (!$this->isFullyEnabled()) {
throw new \RuntimeException("PhpSpreadsheet is not enabled. Please refer to README.md");
}
- 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"