Showing 1,388 of 1,858 total issues
Method moveItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function moveItem($varId, $wish_list_id, $to_listId = '', $to_listName = '', $user_id = null) {
- Create a ticketCreate a ticket
Method drawTextB
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function drawTextB($text, $x, $y, $width, $height) {
- Create a ticketCreate a ticket
Method updateVariable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateVariable($template_id, $variable, $variableNewValue, $oldVariable, $locale) {
- Create a ticketCreate a ticket
Method updateVariable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateVariable($template_id, $variable, $variableNewValue, $oldVariable, $locale) {
- Create a ticketCreate a ticket
Function add_to_ZIP
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function add_to_ZIP($files = []) {
if (empty($files)) {
throw new Exception(lang('Nothing to create', 'admin'));
}
- 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 replaceDynamically
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function replaceDynamically($sString) {
$aTrad = [];
for ($i = 1, $iMax = func_num_args(); $i < $iMax; $i++) {
$arg = func_get_arg($i);
if (is_array($arg)) {
- 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 captcha_check
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function captcha_check($code) {
$CI = get_instance();
$result = TRUE;
if ($this->use_recaptcha) {
- 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 count_words
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function count_words() {
$tmp_arr = [];
foreach ($this->origin_arr as $val) {
if (strlen(utf8_decode($val)) >= $this->min_word_length) {
- 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_translated_array
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function get_translated_array() {
$translated = [];
$lang = $this->defaultLocaleId;
$ck = 'categories_translated_array_' . $lang;
- 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_errors
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function get_errors($prefix = '', $suffix = '') {
if (validation_errors()) {
return validation_errors($prefix = '', $suffix = '');
}
- 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 media_url
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function media_url($url = '') {
$CI = &get_instance();
/* @var $config CI_Config */
$config = $CI->config;
- 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 __construct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($locale = NULL) {
if ($this->useLocales === TRUE) {
$this->locale = $locale !== null ? $locale : MY_Controller::getCurrentLocale();
}
- 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 chose_language
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function chose_language($active = FALSE) {
$ci = &get_instance();
$url_arr = $ci->uri->segment_array();
foreach ((array) MY_Controller::getAllLocales($active) as $l) {
- 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 check_perm
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function check_perm($perm) {
$ci = & get_instance();
if ($ci->dx_auth->is_logged_in()) {
if ($ci->dx_auth->get_permission_value($perm)) {
- 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_main_lang
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function get_main_lang($flag = null) {
$ci = &get_instance();
if (!$ci->db) {
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 tpl_register_asset
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function tpl_register_asset($path, $position = 'before') {
if (is_array($path)) {
foreach ($path as $value) {
- 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 convertXLStoCSV
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function convertXLStoCSV($excel_file = '') {
$objReader = PHPExcel_IOFactory::createReaderForFile($excel_file);
$objReader->setReadDataOnly(true);
$objPHPExcel = $objReader->load($excel_file);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, 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 saveCSVFile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function saveCSVFile() {
$this->takeFileName();
$this->load->library(
'upload',
- 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 outputChart
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function outputChart(array $lines) {
$result = $this->controller->orders_model->getOrdersInfo(
[
'dateFrom' => isset($_GET['from']) ? $_GET['from'] : '2005-05-05',
'dateTo' => isset($_GET['to']) ? $_GET['to'] : date('Y-m-d'),
- 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 getFullField
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getFullField($fieldName) {
if (preg_match('/^\`[0-9a-zA-Z\_]+\`\.\`[0-9a-zA-Z\_]+\`/i', $fieldName)) {
return $fieldName;
} elseif (preg_match('/^[0-9a-zA-Z\_]+$/i', $fieldName)) {
// тільки поле
- 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"