Showing 1,388 of 1,858 total issues
Method index
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index() {
$language = $this->cms_admin->get_default_lang();
// get latest pages
$this->db->limit(5);
- Create a ticketCreate a ticket
Method getTpl
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTpl($check) {
$languages = $this->getLangs();
$usePriceType = self::isPremiumCMS();
- Create a ticketCreate a ticket
Method search
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function search($tag = '', $offset = 0) {
$this->load->module('search');
$this->search->search_tpl = 'search';
$error = FALSE;
- Create a ticketCreate a ticket
Method DB
has 76 lines of code (exceeds 25 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
- Create a ticketCreate a ticket
Function go
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function go(els, opts, manual, fwd) {
// opts.busy is true if we're in the middle of an animation
if (manual && opts.busy && opts.manualTrump) {
// let manual transitions requests trump active ones
$(els).stop(true,true);
- Create a ticketCreate a ticket
Method move_pages
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function move_pages($action) {
$ids = $this->input->post('pages');
$ids_key = array_flip($this->input->post('pages'));
- Create a ticketCreate a ticket
Method register
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function register($username, $password, $email, $address = '', $key, $phone = '', $login_user = TRUE) {
// Load Models
$this->ci->load->model('dx_auth/users', 'users');
$this->ci->load->model('dx_auth/user_temp', 'user_temp');
- Create a ticketCreate a ticket
Method _buildCategoryMeta
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function _buildCategoryMeta($categoryObj) {
CI::$APP->load->helper('array_helper');
$local = MY_Controller::getCurrentLocale();
- Create a ticketCreate a ticket
Method sendEmail
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sendEmail($send_to, $pattern_name, $variables, $attachment = FALSE) {
//loading CodeIgniter Email library
$this->load->library('email');
$locale = MY_Controller::getCurrentLocale();
- Create a ticketCreate a ticket
Method register
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function register() {
if (!$this->dx_auth->is_logged_in() AND $this->dx_auth->allow_registration) {
$val = $this->form_validation;
// Set form validation rules
$this->form_validation->set_message('required', lang('The %s is required', 'auth'));
- Create a ticketCreate a ticket
Method index
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index($id) {
$category = $this->model->getCategory($id);
if (!$category) {
throw new PageNotFoundException();
- Create a ticketCreate a ticket
Function makeRolesArray
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function makeRolesArray($controller_types, $locale) {
/* @var $ci MY_Controller */
$ci = &get_instance();
foreach ($controller_types as $controller_type) {
$result[$controller_type] = $ci->db->query(
- 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 normalizeData
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function normalizeData() {
if ($this->useLocales == TRUE) {
// deleting non locale fields from data array (except those what are present $this->nonLocaleKeys)
foreach ($this->siteinfo as $key => $value) {
if (!in_array($key, $this->locales) & !in_array($key, $this->nonLocaleKeys)) {
- 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 getAddCatFullIds
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private function getAddCatFullIds($prodIds) {
if (count($prodIds)) {
$catIds = [];
$cats = [];
- 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 getParsedPathsLangs
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function getParsedPathsLangs($baseUrl, $paths = []) {
if ($paths) {
$result = [];
if ($paths) {
- 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 makeCorrectPoPaths
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function makeCorrectPoPaths($module_template, $type, $lang, $returnArray = FALSE) {
$url = dirname($this->poFileManager->getPoFileUrl($module_template, $type, $lang));
//______________________________________________________
$url = get_mainsite_url($url);
- 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 processProperties
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function processProperties() {
foreach ($this->importData as $property) {
$propertyData = [];
$externalId = (string) $property->Ид;
$name = (string) $property->Наименование;
- 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_getImagesData
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function pass1Helper_getImagesData(SimpleXMLElement $product, $exId) {
$additionalImages = NULL;
$mainImage = NULL;
- 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_user
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function create_user() {
if ($this->input->post()) {
$this->load->model('dx_auth/users', 'user2');
- 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 cache.php
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
- Create a ticketCreate a ticket