Showing 1,388 of 1,858 total issues
Function getSCategories
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function getSCategories(Criteria $criteria = null, ConnectionInterface $con = null)
{
$partial = $this->collSCategoriesPartial && !$this->isNew();
if (null === $this->collSCategories || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collSCategories) {
- 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 DB
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
function &DB($params = '', $active_record_override = NULL) {
// Load the DB config file if a DSN string wasn't passed
if (is_string($params) AND strpos($params, '://') === FALSE) {
// the only logic changes are in next few lines
- 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 add
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function add() {
($hook = get_hook('comments_on_add')) ? eval($hook) : NULL;
// Load comments model
- 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 renameLocaleFolders
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private function renameLocaleFolders($from_locale, $to_locale) {
if ($from_locale && $to_locale) {
$templates_dir = './templates';
$main_dir = './application/language/main';
- 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 _sanitize_globals
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function _sanitize_globals() {
// It would be "wrong" to unset any of these GLOBALS.
$protected = ['_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',
'_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',
'system_folder', 'application_folder', 'BM', 'EXT',
- 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 create_item
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create_item($id = null) {
if (!$this->input->post()) {
$parents = $this->db
->where('menu_id', $id)
- Create a ticketCreate a ticket
File BaseImport.php
has 387 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace import_export\classes;
use CI_DB_active_record;
- Create a ticketCreate a ticket
Method processProducts1
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function processProducts1() {
$propertiesDataUpdate = [];
$productPropDTDel = [];
- Create a ticketCreate a ticket
Function getMoFilePath
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function getMoFilePath($domain) {
if ($domain) {
if (!defined('CUR_LOCALE')) {
$CI = &get_instance();
- 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 runProductUpdateQuery
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function runProductUpdateQuery($productId, $arg, $EmptyFields) {
$insertData = [];
if ($arg['url'] != '') {
$arg['url'] = $this->urlCheck($arg['url'], $productId);
- 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 step_1
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function step_1() {
$result = TRUE;
// Check folders permissions
$dir_array = [
- 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 pass1Helper_getPropertiesData
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
protected function pass1Helper_getPropertiesData(SimpleXMLElement $product, $categoryId) {
$brandIdentif = Properties::getInstance()->getBrandIdentif();
$brandId = '';
- 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 initBanners
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initBanners() {
$(".frame_label:has(.niceCheck)").die('click').live('click', function () {
var $this = $(this);
- Create a ticketCreate a ticket
File discount_model_admin.php
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Currency\Currency;
if (!defined('BASEPATH')) {
- Create a ticketCreate a ticket
Function menuChildren
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
function menuChildren(items, $children, counter) {
if (!counter) {
counter = 0;
}
- Create a ticketCreate a ticket
Method resize_and_thumb
has 130 lines of code (exceeds 25 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) {
- Create a ticketCreate a ticket
File languages.php
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
- Create a ticketCreate a ticket
Method make_install
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function make_install() {
$this->load->helper('file');
$this->load->helper('url');
$db_server = $this->input->post('db_host');
- Create a ticketCreate a ticket
Function create_field
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function create_field() {
$form = $this->get_form('create_field');
$form->action = $this->get_url('create_field');
$form->title = lang('Field creating', 'cfcm');
- 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 insert_menu_item
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function insert_menu_item() {
$roles = $this->input->post('roles');
if ($roles == NULL) {
$roles = '';
- 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"