Showing 486 of 487 total issues
Method render
has 93 lines of code (exceeds 25 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);
File TableUtility.php
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
File Module_model.php
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function makeInterfaceButtonsToWork
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
makeInterfaceButtonsToWork: function () {
$('input[type=submit].button:visible').each(function () { // a.button:visible
var $button = $(this);
- 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 generate
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function generate()
{
$this->generateSetNoCacheHeaders();
// Default value
- 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 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
// Overwriting uploads base path
Function importFrameworkLogs
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function importFrameworkLogs()
{
// Reading logs from the given location
$log_path = $this->config->item('log_path');
$logs = glob($log_path . '*.php');
- 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 send
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function send($to, $from, $from_name, $subject, $message,
$html = false, $attachments = array(), $reply_to = false, $reply_to_name = false)
{
if (!$html) {
$message = str_replace("\r\n", "\n", $message);
- 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 _datagrid_format_id_metadata_column
has 85 lines of code (exceeds 25 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
Method generateFilters
has 82 lines of code (exceeds 25 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) {
Module_model
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Module_model extends PEPISCMS_Model
{
/**
* Module_model constructor.
*/
Method applyFilters
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function applyFilters(&$output, $filters)
{
$output_new = array();
// Reading the original feed line by line
Method do_setup
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function do_setup()
{
$view = $this->_get_view();
$module = $this->input->getParam('module');
Method move
has 78 lines of code (exceeds 25 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) {
Method _on_page_save_callback
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _on_page_save_callback(&$data)
{
/*
* TESTS
* Update page contents
Function generatePagination
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private function generatePagination($no_of_pages, $order_by, $order, $applied_filter_values, $page)
{
if ($no_of_pages < 1) {
return '';
}
- 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 execute
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private function execute($language_code = '', $uri = '')
{
$this->load->library('ModuleRunner');
$this->load->library('Widget');
- 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 _run_hook
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function _run_hook($data)
{
// Closures/lambda functions and array($object, 'method') callables
if (is_callable($data)) {
is_array($data)
- 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 writeConfigFiles
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function writeConfigFiles($data, $base_path)
{
list($hostname, $port) = $this->explodeHostname($data['hostname']);
$templates_base_path = realpath(dirname(realpath(__FILE__)) . '/../../resources/config_template/') . '/';
File Ajaxfilemanager.php
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*