Showing 1,388 of 1,858 total issues
File settings.php
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use template_manager\classes\Template;
if (!defined('BASEPATH')) {
- Create a ticketCreate a ticket
Method install
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install() {
$this->load->dbforge();
($this->dx_auth->is_admin()) OR exit;
@mkdir('./uploads/mod_wishlist', 0777);
- Create a ticketCreate a ticket
Method execute
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute($where = [], $offset = 0) {
$collect_ids = FALSE;
if ($this->table == '') {
$error = lang('Error. Select or specify the table for search', 'search');
- Create a ticketCreate a ticket
Function replaceKeys
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function replaceKeys($templateName) {
$templatesPath = ' ./templates / ' . $templateName;
$fromLocale = 'en_US';
$pofilePath = $templatesPath . ' / language / ' . $templateName . ' / ' . $fromLocale . ' / LC_MESSAGES / ' . $templateName . ' . 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 toArray
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function toArray($name, $type, $lang, $langOn = TRUE) {
$path = $this->getPoFileUrl($name, $type, $lang);
if (!FileOperator::getInstatce()->checkFile($path, $langOn)) {
$error = FileOperator::getInstatce()->getErrors();
- 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 add
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function add() {
($hook = get_hook('comments_on_add')) ? eval($hook) : NULL;
// Load comments model
- Create a ticketCreate a ticket
Admin
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class Admin extends BaseAdminController
{
/**
*
- Create a ticketCreate a ticket
File BannersQuery.php
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace xbanners\models\Base;
use \Exception;
- Create a ticketCreate a ticket
Method GetPagesByCategory
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetPagesByCategory($cat_id = 'all', $pagination = null) {
//////********** Pagination pages **********\\\\\\\
if ($pagination) {
$paginationSession = ['pages_pag_url' => $pagination];
- Create a ticketCreate a ticket
Method settings
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function settings($action = 'show') {
switch ($action) {
case 'show':
\CMSFactory\assetManager::create()
- Create a ticketCreate a ticket
Method prepare_menu_array
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function prepare_menu_array($menu) {
$menu_cache_key = $this->cache_key . $menu . self::getCurrentLocale();
if (($menu_data = $this->cache->fetch($menu_cache_key, 'menus')) !== FALSE) {
$this->menu_array = $menu_data['menu_array'];
$this->sub_menu_array = $menu_data['sub_menu_array'];
- Create a ticketCreate a ticket
Function register
has a Cognitive Complexity of 29 (exceeds 5 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');
- 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 build_cats_tree
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function build_cats_tree($cats, $selected_cats = []) {
if (is_array($cats)) {
foreach ($cats as $cat) {
echo '<option';
- 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 doSave
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
protected function doSave(ConnectionInterface $con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
- 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 validateCustomData
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function validateCustomData($validator) {
if (!empty($this->entityName)) {
$this->collectCustomData($this->entityName, $this->getId());
if ($this->hasCustomData !== 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 _show
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
_show = function() {
var pos, equal;
loading.hide();
- Create a ticketCreate a ticket
Function key
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
key: function(e) {
var opt = $currentTrigger.data('contextMenu') || {};
switch (e.keyCode) {
case 9:
- Create a ticketCreate a ticket
Method install
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install() {
$this->load->dbforge();
($this->dx_auth->is_admin()) OR exit;
- Create a ticketCreate a ticket
Method runProductInsertQuery
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function runProductInsertQuery($arg, $EmptyFields) {
if ($arg['name'] == '') {
Logger::create()
->set('Колонка имени товара пустая. NUM - ' . $arg['num'] . ' insert. - IMPORT');
return;
- Create a ticketCreate a ticket
Method index
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index() {
$segs = $this->uri->uri_to_assoc(6);
$status = $segs['status'];
$off_set = $segs['page'];
- Create a ticketCreate a ticket