Showing 1,388 of 1,858 total issues
File BannersI18n.php
has 647 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 635 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\assetManager;
use translator\classes\PoFileManager;
use translator\classes\FileOperator;
- Create a ticketCreate a ticket
Function _get_real_tpl
has a Cognitive Complexity of 69 (exceeds 5 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'];
- 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 display_menu
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
public function display_menu($menu_array) {
$array_keys = array_keys($menu_array);
$start_index = $array_keys[0];
$end_index = $array_keys[count($array_keys) - 1];
- 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_links
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
public function create_links() {
// If our item count or per-page total is zero there is no need to continue.
if ($this->total_rows == 0 OR $this->per_page == 0) {
return '';
}
- 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
BannerImageI18n
has 68 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class BannerImageI18n extends PropelBaseModelClass implements ActiveRecordInterface
{
/**
* TableMap class name
*/
- Create a ticketCreate a ticket
Function create_item
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function create_item($id = null) {
if (!$this->input->post()) {
$parents = $this->db
->where('menu_id', $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 prepare_menu_array
has a Cognitive Complexity of 63 (exceeds 5 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'];
- 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_captcha
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '') {
/**
* Function to create a random color
* Note: We aren't using this outside this function so we will sit it inside
* @auteur mastercode.nl
- 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 findLangs
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
public function findLangs($dir = '') {
if (!in_array($dir, self::$PARSED_PATHS)) {
$baseDir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
foreach ($baseDir as $file) {
- 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 Export.php
has 550 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Клас призначений для експорту даних в файл форматів: csv,xlsx,xls.
* Також передбачена можливість вигрузки основних та додаткових зображень в ZIP-архів
- Create a ticketCreate a ticket
File exchange.php
has 550 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
(defined('BASEPATH')) or exit('No direct script access allowed');
use CMSFactory\ModuleSettings;
- Create a ticketCreate a ticket
File categories.php
has 548 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\Events;
use core\models\Route;
use core\models\RouteQuery;
- Create a ticketCreate a ticket
BannersI18n
has 62 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class BannersI18n extends PropelBaseModelClass implements ActiveRecordInterface
{
/**
* TableMap class name
*/
- Create a ticketCreate a ticket
File PoFileManager.php
has 541 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace translator\classes;
use Gettext\Translations;
- Create a ticketCreate a ticket
File commentsapi.php
has 526 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use core\models\Route;
use core\src\CoreFactory;
use CMSFactory\Events;
- Create a ticketCreate a ticket
Function execute
has a Cognitive Complexity of 55 (exceeds 5 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');
- 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 wishlist_model.php
has 524 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use cmsemail\email;
use CMSFactory\ModuleSettings;
use core\models\Route;
- Create a ticketCreate a ticket
Function initDiscounts
has 214 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initDiscounts() {
var isGift = $('#gift_checkbox').attr('checked') == 'checked';
if (isGift) {
giftCheckboxCallback();
- Create a ticketCreate a ticket
File comments.php
has 521 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use CMSFactory\assetManager;
if (!defined('BASEPATH')) {
- Create a ticketCreate a ticket