Showing 1,388 of 1,858 total issues
File admin.php
has 338 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 mod_seo.php
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\Events;
use CMSFactory\MetaManipulator\GalleryMetaManipulator;
use CMSFactory\MetaManipulator\MetaManipulator;
- Create a ticketCreate a ticket
Function create
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function create() {
if (!$this->_is_writable()) {
showMessage(lang('Set the directory access rights to continue the work with widgets', 'admin') . '<b>' . $this->widgets_path . '</b>', '', 'r');
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
Function command_catalog_file
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private function command_catalog_file() {
if ($this->check_perm() === true) {
$file_info = pathinfo($this->input->get('filename'));
$file_extension = $file_info['extension'];
- 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 processProducts23_Insert23
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function processProducts23_Insert23() {
// process 2 (adding product_id to tables data)
$products = &$this->insertCollector->getData('shop_products');
$productsI18n = &$this->insertCollector->getData('shop_products_i18n');
- 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 getUsers
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUsers(array $params_ = []) {
$params = [
'interval' => 'day',
'dateFrom' => NULL,
'dateTo' => NULL,
- Create a ticketCreate a ticket
File authapi.php
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\Events;
(defined('BASEPATH')) OR exit('No direct script access allowed');
- Create a ticketCreate a ticket
Method index
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index() {
$settings = $this->cms_admin->get_settings();
unset($settings['siteinfo']);
- Create a ticketCreate a ticket
assetManager
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class assetManager
{
/**
* @var assetManager
- Create a ticketCreate a ticket
Method drawMainData
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function drawMainData($y = 10) {
$width = 150;
$lineStep = 5;
$x = 55;
if ($y == 'step2') {
- Create a ticketCreate a ticket
Method install
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install() {
$this->load->dbforge();
($this->dx_auth->is_admin()) OR exit;
$fields = [
'key' => [
- Create a ticketCreate a ticket
Method create
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create() {
if (!$this->_is_writable()) {
showMessage(lang('Set the directory access rights to continue the work with widgets', 'admin') . '<b>' . $this->widgets_path . '</b>', '', 'r');
exit;
}
- Create a ticketCreate a ticket
Method edit
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit($page_id, $lang = 0) {
$this->cms_base->setLocaleId($lang);
if ($this->cms_admin->get_page($page_id) == FALSE) {
showMessage(lang('Page', 'admin') . $page_id . lang('Not found', 'admin'), false, 'r');
- Create a ticketCreate a ticket
Method productInfo
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function productInfo($perPage = 0) {
// Get products model
$model = SProductsQuery::create()
->joinWithI18n(\MY_Controller::defaultLocale())
->addSelectModifier('SQL_CALC_FOUND_ROWS')
- Create a ticketCreate a ticket
Function cache_file
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function cache_file() {
$n = 0;
$cache_store_dir = $this->_Config['store'] . '/';
if (is_dir($cache_store_dir) and ( $root_dir_handle = opendir($cache_store_dir))) {
- 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 edit_field
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function edit_field($name = '') {
$name = urldecode($name);
$this->db->limit(1);
$field = $this->db->get_where('content_fields', ['field_name' => (string) $name]);
- 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 lib_seo.php
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
- Create a ticketCreate a ticket
BannerImageQuery
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class BannerImageQuery extends ModelCriteria
{
protected $entityNotFoundExceptionClass = '\\Propel\\Runtime\\Exception\\EntityNotFoundException';
/**
- Create a ticketCreate a ticket
File admin.php
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
(defined('BASEPATH')) OR exit('No direct script access allowed');
use CMSFactory\assetManager;
- Create a ticketCreate a ticket
Method create_links_ajax
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create_links_ajax() {
$CI = &get_instance();
// If our item count or per-page total is zero there is no need to continue.
- Create a ticketCreate a ticket