Showing 482 of 487 total issues
File PEPISCMS_Loader.php
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Method dologin
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function dologin()
{
$this->_oninit();
$this->load->library('Logger');
Method _fb_callback_on_save
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _fb_callback_on_save(&$data)
{
$user_id = $this->formbuilder->getId();
if (!$data['birth_date'] || $data['birth_date'] = '0000-00-00') {
Method fix_autoincrement_on_cms_tables
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fix_autoincrement_on_cms_tables()
{
$tables = array(
'database_table_users' => array('user_id', 'INT UNSIGNED'),
'database_table_group_to_entity' => array('id', 'INT'),
Method generate
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate()
{
$this->generateSetNoCacheHeaders();
// Default value
Method __construct
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
// Do not render menu and skip authorization
parent::__construct(false, true);
Function runAdminModule
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function runAdminModule($module_name, $method)
{
$this->load->model('Module_model');
if (!$module_name || !self::isModuleInstalled($module_name)) {
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 __doGet
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function __doGet($var)
{
static $CI;
isset($CI) or $CI = CI_Controller::get_instance();
- 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 display_steps
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function display_steps($steps, $type)
{
$html = '';
$html .= '<nav class="steps ' . $type . '">' . "\n";
$i = 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
Function generateHandleFileUpload
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function generateHandleFileUpload(&$save_array)
{
if (count($this->file_upload_fields) == 0) {
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 formatCells
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function formatCells($menu, $level, &$lang, &$url_suffix, $site_language, $view)
{
static $tabs = "\t\t";
if (!count($menu) > 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
Method execute
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function execute($language_code = '', $uri = '')
{
$this->load->library('ModuleRunner');
$this->load->library('Widget');
Method is_allowed_filetype
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function is_allowed_filetype($ignore_mime = false)
{
if ($this->allowed_types === '*') {
return true;
}
Method _edit
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _edit($is_preview = false, $display_view = true)
{
$forced_filters = $this->getForcedFilters();
$definition = $this->getDefinition();
Method parseCommandFeed
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseCommandFeed($contents, $fields_that_can_contain_spaces = array())
{
// Line counter, -1 meaning reading headers
$line_counter = -1;
Method generatePagination
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function generatePagination($no_of_pages, $order_by, $order, $applied_filter_values, $page)
{
if ($no_of_pages < 1) {
return '';
}
Method _model
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _model($model, $name = '', $db_conn = false, $hardfail = true)
{
if (is_array($model)) {
foreach ($model as $babe) {
$this->model($babe);
Method translateCIValidationRulesToJSValidationEngineRules
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function translateCIValidationRulesToJSValidationEngineRules($validation_rules)
{
$validation_rules = trim($validation_rules);
if (!$validation_rules) {
return '';
Method runAdminModule
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function runAdminModule($module_name, $method)
{
$this->load->model('Module_model');
if (!$module_name || !self::isModuleInstalled($module_name)) {
return false;
Method runModule
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function runModule($module_name, $method)
{
$this->load->model('Module_model');
if (!$module_name || !self::isModuleInstalled($module_name)) {
return false;