Showing 482 of 487 total issues
Method genericthumb
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function genericthumb($absolute = false, $size = 50, $current_path = false)
{
if (!$current_path) {
$start_word = 'thumb';
$pos = strpos($_SERVER['REQUEST_URI'], $start_word);
Method features
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function features()
{
$_LANG_DIR = dirname(realpath(__FILE__)) . '/../../language/';
$_THEMES_DIR = INSTALLATIONPATH . 'theme/';
PagesAdmin
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class PagesAdmin extends ModuleAdminController
{
/**
* Base path for file uploads
*
Function toggleOverlay
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggleOverlay: function (el, trigger) {
var html = '<div class="overlay_mask" style="display: none;"></div><div class="overlay_window">';
html += '<div class="box_content">';
html += '<h4>';
html += '<a href="#" class="trigger close_overlay">';
Method applyFilters
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function applyFilters($db, $filters)
{
$allowed_conditions = array(
'eq' => '=',
'ne' => '!=',
Method importFrameworkLogs
has 54 lines of code (exceeds 25 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');
Method __construct
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($render_menu = true, $skip_authorization = false)
{
parent::__construct();
$this->benchmark->mark('admin_controller_construct_start');
File DevelopmentAdmin.php
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* PepisCMS
*
Function register
has a Cognitive Complexity of 16 (exceeds 5 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);
- 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 encodeFiltersString
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function encodeFiltersString($filters)
{
if (!is_array($filters)) {
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 getFiltersForDataFeed
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getFiltersForDataFeed()
{
$pairs = $this->getFilterPairs();
$applied_filter_values = array(); // For links and user interface
- 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 saveAllConfigurationVariables
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function saveAllConfigurationVariables($data)
{
$known_config_data = (array)$this->getAllConfigurationVariables();
$data = array_merge($known_config_data, $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
Function genericthumb
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function genericthumb($absolute = false, $size = 50, $current_path = false)
{
if (!$current_path) {
$start_word = 'thumb';
$pos = strpos($_SERVER['REQUEST_URI'], $start_word);
- 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 generateXML
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function generateXML($feed, $headers = false, $file_name = false, $send = true, $root_name = false, $item_name = false)
{
if (!$file_name) {
$file_name = 'spreadsheet-' . date('Y-m-d-h-i-s') . '.xml';
}
- 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 tailAFile
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function tailAFile($path, $count = 10)
{
if (!file_exists($path)) {
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 __construct
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($render_menu = true, $skip_authorization = false)
{
parent::__construct();
$this->benchmark->mark('admin_controller_construct_start');
- 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 deletemenuelement
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function deletemenuelement()
{
$item_id = $this->input->getParam('item_id');
$success = 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 import
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function import()
{
if (!$this->isImportable()) {
show_404();
}
Method _run_hook
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _run_hook($data)
{
// Closures/lambda functions and array($object, 'method') callables
if (is_callable($data)) {
is_array($data)
Method generateXML
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateXML($feed, $headers = false, $file_name = false, $send = true, $root_name = false, $item_name = false)
{
if (!$file_name) {
$file_name = 'spreadsheet-' . date('Y-m-d-h-i-s') . '.xml';
}