Showing 1,388 of 1,858 total issues
Method compile
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($file) {
// Read template data
$tpl_data = $this->read_tpl_file($file);
if ($tpl_data === FALSE) {
- Create a ticketCreate a ticket
Method insert_menu_item
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insert_menu_item() {
$roles = $this->input->post('roles');
if ($roles == NULL) {
$roles = '';
- Create a ticketCreate a ticket
Method display_menu
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function display_menu($menu_array) {
$array_keys = array_keys($menu_array);
$start_index = $array_keys[0];
$end_index = $array_keys[count($array_keys) - 1];
- Create a ticketCreate a ticket
File tags.php
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
- Create a ticketCreate a ticket
Function splitTplFiles
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function splitTplFiles($tpl) {
if (false === strpos($tpl, '</html>')) {
return $tpl;
}
- Read upRead up
- Create a ticketCreate a ticket
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 create
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function create($action, $cat_id = 0) {
$url = $this->formUrl();
$this->form_validation->set_rules('name', lang('Title', 'admin'), 'trim|required|min_length[1]|max_length[160]|xss_clean');
- Read upRead up
- Create a ticketCreate a ticket
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 search
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function search($tag = '', $offset = 0) {
$this->load->module('search');
$this->search->search_tpl = 'search';
$error = FALSE;
- Read upRead up
- Create a ticketCreate a ticket
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_email
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function send_email() {
// Load form validation class
$this->load->library('form_validation');
- Read upRead up
- Create a ticketCreate a ticket
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 resize_and_thumb
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
private function resize_and_thumb($file = []) {
$this->load->library('image_lib');
// Resize image
if ($this->conf['max_width'] > 0 AND $this->conf['max_height'] > 0) {
- Read upRead up
- Create a ticketCreate a ticket
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 parse
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function parse($module_template, $type, $lang) {
$url_base = dirname($this->poFileManager->getPoFileUrl($module_template, $type, $lang));
$url = get_mainsite_url($url_base);
- Read upRead up
- Create a ticketCreate a ticket
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 runFactory
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public static function runFactory($eventAlias = null, $cleanQueue = false) {
(defined('BASEPATH')) OR exit('No direct script access allowed');
foreach (Events::create()->storage as $storageKey => $value) {
if ($eventAlias != null && $eventAlias != $storageKey) {
- Read upRead up
- Create a ticketCreate a ticket
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 get_language_names
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_language_names() {
$languageCodes = [
'ab' => lang('Abkhazian', 'translator', FALSE),
'ae' => lang('Avestan', 'translator', FALSE),
- Create a ticketCreate a ticket
Admin
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Admin extends BaseAdminController
{
// Gallery config
public $conf = [
- Create a ticketCreate a ticket
File assetManager.php
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CMSFactory;
use CI;
- Create a ticketCreate a ticket
File scripts.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
$(document).ready(function () {
/** Menu hide/show blocks **/
$('section.mod_stats').on('click', 'a.firstLevelMenu', function () {
var submenuBlock = $(this).next('.submenu');
if (!$(submenuBlock).is(":visible")) {
- Create a ticketCreate a ticket
Method addPost
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addPost() {
$this->setCommentsLocale();
$this->load->model('base');
$this->_init_settings();
- Create a ticketCreate a ticket
Method step_1
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function step_1() {
$result = TRUE;
// Check folders permissions
$dir_array = [
- Create a ticketCreate a ticket
Function addToArchive
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function addToArchive($arr) {
$zip = new \ZipArchive();
$date = date('m_d_y');
$time = date('G_i_s');
$zipName = 'archive_' . $date . '_' . $time . '.zip';
- Read upRead up
- Create a ticketCreate a ticket
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 index
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function index() {
$segs = $this->uri->uri_to_assoc(6);
$status = $segs['status'];
$off_set = $segs['page'];
- Read upRead up
- Create a ticketCreate a ticket
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 createLanguageFolders
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function createLanguageFolders($lang) {
$templates_dir = './templates';
$main_dir = './application/language/main';
$modules_dir = './application/modules';
- Read upRead up
- Create a ticketCreate a ticket
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"