Showing 482 of 487 total issues
Function onAuthRequest
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function onAuthRequest()
{
parse_str(substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1), $_GET);
$this->_init();
phpCAS::forceAuthentication();
- 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 getManyToManyRelationshipsRelatedToTable
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function getManyToManyRelationshipsRelatedToTable($table)
{
$related_foreign_keys = $this->getForeignKeysRelatedToTable($table);
$many_to_many_fks = 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
File DefaultFormRenderer.php
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function makeInterfaceButtonsToWork
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
makeInterfaceButtonsToWork: function () {
$('input[type=submit].button:visible').each(function () { // a.button:visible
var $button = $(this);
Method getAvailableTimezones
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAvailableTimezones()
{
$tz = array(
'Europe/Amsterdam',
'Europe/Andorra',
Method formatCells
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formatCells($menu, $level, &$lang, &$url_suffix, $site_language, $view)
{
static $tabs = "\t\t";
if (!count($menu) > 0)
File MenuRendor.php
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Method register
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function register($display_name, $user_email, $user_login = false, $password = false, $group_ids = array(), $is_root = false, $send_email_notification = true, $data = array(), $account_type = 0)
{
// If there is no password specified, lets generate one for the user
if (!$password) {
$password = $this->generateEasyPassword($this->getMinimumAllowedPasswordLenght() + 2);
File CrudFieldDefinitionBuilder.php
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Method model
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function model($model, $name = '', $db_conn = false, $hardfail = true)
{
// Keep this redundancy
$original_model = $model;
$original_name = $name;
Method loadForModule
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadForModule($langfile = '', $idiom = '', $return = false, $module_name = false)
{
// TODO Remove this hack
$langfile = str_replace('.php', '', str_replace('_lang.', '', $langfile)) . '_lang.php';
Method index
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index()
{
$this->load->library('DataGrid');
$this->load->library('SimpleSessionMessage');
$this->load->library('LogsRowFormattingUtility');
Function getDistinctAssoc
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getDistinctAssoc($column, $table = false, $pairs = false, $where_conditions = false)
{
if (!$table) {
$table = $this->getTable();
}
- 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 addFieldByDefinition
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function addFieldByDefinition($field)
{
if (!isset($field['field']) || !$field['field']) {
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 is_allowed_filetype
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function is_allowed_filetype($ignore_mime = false)
{
if ($this->allowed_types === '*') {
return true;
}
- 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 translateCIValidationRulesToJSValidationEngineRules
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function translateCIValidationRulesToJSValidationEngineRules($validation_rules)
{
$validation_rules = trim($validation_rules);
if (!$validation_rules) {
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
Method index
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index()
{
// Reading history
$query_history = $this->auth->getSessionVariable('sqlconsole_query_history');
if (!$query_history) {
Function init
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.init = function () {
if (transtlation_map instanceof Object) {
if (transtlation_map.label_new_folder_name) {
dialog.new_folder_name = transtlation_map.label_new_folder_name;
Method mysqldump
has 56 lines of code (exceeds 25 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;
}
File Installer_helper.php
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*