Showing 1,388 of 1,858 total issues
Method runProductVariantUpdateQuery
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function runProductVariantUpdateQuery(&$arg, &$productId, $EmptyFields) {
/* START product variant insert query block */
$prepareNames = $binds = $updateData = [];
- Create a ticketCreate a ticket
File profiler_template.php
has 308 lines of code (exceeds 250 allowed). Consider refactoring. Open
<style type="text/css">
#codeigniter-profiler { clear: both; background: #222; opacity: 0.45; padding: 0 5px; font-family: Helvetica, sans-serif; font-size: 10px !important; line-height: 12px; position: absolute; width: auto; min-width: 52em; max-width: 90%; z-index: 1000; display: none; }
#codeigniter-profiler:hover { background: #101010; opacity: 1.0; }
#codeigniter-profiler.bottom-right { position: fixed; bottom:0; right: 0; -webkit-border-top-left-radius: 7px; -moz-border-radius-topleft: 7px; border-top-left-radius: 7px; -webkit-box-shadow: -1px -1px 10px #222; -moz-box-shadow: -1px -1px 10px #222; box-shadow: -1px -1px 10px #222; }
- Create a ticketCreate a ticket
File TemplateManager.php
has 308 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace template_manager\classes;
use CMSFactory\Events;
- Create a ticketCreate a ticket
Method index
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index($hash = '', $offset = 0) {
$this->load->module('search');
$this->load->helper('category');
- Create a ticketCreate a ticket
Method create_trash
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create_trash() {
$this->form_validation->set_rules('url', 'Url', 'required');
$this->db->where('name', 'shop')->get('components');
- Create a ticketCreate a ticket
File RouteQuery.php
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace core\models\Base;
use \Exception;
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if ( $el.is('img') ) {
// sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when
// an image is being downloaded and the markup did not include sizing info (height/width attributes);
// there seems to be some "default" sizes used in this situation
var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
- Create a ticketCreate a ticket
Method _get_real_tpl
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _get_real_tpl($index = 0, $mode = 'item') {
if ($mode == 'item') {
$is_active = $this->arranged_menu_array[$index]['is_active'];
$edge = $this->arranged_menu_array[$index]['edge'];
- Create a ticketCreate a ticket
Method translit
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function translit($str) {
$tr = [
'А' => 'A',
'Б' => 'B',
'В' => 'V',
- Create a ticketCreate a ticket
Function roleEdit
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function roleEdit($roleId) {
$locale = MY_Controller::getCurrentLocale();
$queryModel = $this->db->select('shop_rbac_roles.id, shop_rbac_roles.name , shop_rbac_roles.importance, shop_rbac_roles_i18n.alt_name, shop_rbac_roles_i18n.description ')
- 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 compile
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function compile($file) {
// Read template data
$tpl_data = $this->read_tpl_file($file);
if ($tpl_data === 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 update_widget
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function update_widget($id, $update_info = FALSE, $locale = NULL) {
//cp_check_perm('widget_access_settings');
$locale = $locale ?: MY_Controller::defaultLocale();
$widget = $this->get($id);
- 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 updateJsLangsFile
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function updateJsLangsFile($langs, $domain, $type) {
if ($type == 'modules') {
if (MAINSITE && !is_client_module($domain)) {
return 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 fetchApiTpl
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private static function fetchApiTpl() {
$obj = CI::$APP;
if (!$obj->input->is_ajax_request() || $obj->input->get('_pjax')) {
$translator = $obj->db->where('name', 'translator')->get('components');
- 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 prepareData
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function prepareData(\SimpleXMLElement $banner) {
if ($banner->getName() != 'groups') {
$attributes = $banner->attributes();
$this->bannerData = [
'group' => (string) $attributes->group ? serialize(explode(',', trim((string) $attributes->group))) : '',
- 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 makePoFileData
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function makePoFileData($data = []) {
$resultData = [];
foreach ($data as $key => $po) {
if ($po) {
$po = $this->preparePoFileData((array) $po);
- 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 get_entity_mod
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function get_entity_mod($w) {
$ci = & get_instance();
switch ($w) {
case $w == 'product_0':
return 'product - all';
- 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 updateImageSizes
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function updateImageSizes($imageSizes) {
$sizes = [];
foreach ($imageSizes->size as $size) {
if (isset($size['name']) && isset($size['width']) && isset($size['height'])) {
if (is_numeric((string) $size['width']) && is_numeric((string) $size['height'])) {
- 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 countSearchResults
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function countSearchResults($where) {
// begin query
if (count($where) > 0) {
foreach ($where as $params) {
// Set search operator. (where, like, or_where, etc..)
- 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
BannersQuery
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class BannersQuery extends ModelCriteria
{
protected $entityNotFoundExceptionClass = '\\Propel\\Runtime\\Exception\\EntityNotFoundException';
/**
- Create a ticketCreate a ticket