Showing 1,388 of 1,858 total issues
File menu.php
has 521 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 widget_navigation
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function widget_navigation($widget = []) {
$this->load->module('core');
$segmentGallery = $this->pathGallery();
if ($this->core->core_data['data_type'] === '404' || !$this->core->core_data['data_type'] || $segmentGallery === 'gallery') {
- Create a ticketCreate a ticket
Function runProperties
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function runProperties() {
if (ImportBootstrap::hasErrors()) {
return FALSE;
}
$properties = $this->db->query('SELECT `id`, `csv_name` FROM `shop_product_properties`')->result();
- 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
DX_Auth
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
class DX_Auth
{
// Private
var $_banned;
- Create a ticketCreate a ticket
MetaManipulator
has 53 functions (exceeds 20 allowed). Consider refactoring. Open
class MetaManipulator
{
const META_TITLE = 1;
const META_DESCRIPTION = 2;
const META_KEYWORDS = 3;
- Create a ticketCreate a ticket
File sitemap.php
has 476 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\Events;
use core\models\Route;
use core\src\CoreFactory;
- Create a ticketCreate a ticket
Function add
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
private function add() {
if (!in_array($this->name, $this->widgets) || $this->rewriteData) {
/**
* Check widget type(module, html) adn prepare widget data
*/
- 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 edit_item
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit_item($item_id) {
if (!$this->input->post()) {
$item = $this->db
->where('menus_data.id', $item_id)
- Create a ticketCreate a ticket
Function updateDiscountsApplies
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public function updateDiscountsApplies() {
BaseDiscount::prepareOption(['reBuild' => 1]);
$baseDiscount = BaseDiscount::create();
if (BaseDiscount::checkModuleInstall()) {
- 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
File BannerImageQuery.php
has 452 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace xbanners\models\Base;
use \Exception;
- Create a ticketCreate a ticket
File admin.php
has 452 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
- Create a ticketCreate a ticket
File components.php
has 449 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\Events;
if (!defined('BASEPATH')) {
- Create a ticketCreate a ticket
Function command_sale_import
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
private function command_sale_import() {
if ($this->check_perm() != true) {
exit();
}
- 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 installModule
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function installModule($robotsCheck) {
$this->load->dbforge();
($this->dx_auth->is_admin()) OR exit;
- Create a ticketCreate a ticket
File search.php
has 435 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 register
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function register() {
$this->core->set_meta_tags(lang('Registration', 'auth'));
$this->template->registerMeta('ROBOTS', 'NOINDEX, NOFOLLOW');
$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 _start
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
_start = function() {
var obj = selectedArray[ selectedIndex ],
href,
type,
title,
- Create a ticketCreate a ticket
Function widget_navigation
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function widget_navigation($widget = []) {
$this->load->module('core');
$segmentGallery = $this->pathGallery();
if ($this->core->core_data['data_type'] === '404' || !$this->core->core_data['data_type'] || $segmentGallery === 'gallery') {
- 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
File widgets_manager.php
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\Events;
use translator\classes\Replacer;
- Create a ticketCreate a ticket
Method make_install
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function make_install() {
// Enable url access and install default settings
$params = [
- Create a ticketCreate a ticket