Showing 1,388 of 1,858 total issues
Function is_prop_multiple
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function is_prop_multiple($prop_id, $props) {
foreach ($props as $val) {
if ($val[external_id] == $prop_id) {
if ($val[multiple]) {
- 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
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _create() {
if (!$this->ajaxRequest) {
$this->display_tpl('create_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 filterById
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function filterById($id = null, $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
- 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 similar_posts_configure
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function similar_posts_configure($action = 'show_settings', $widget_data = []) {
if ($this->dx_auth->is_admin() == FALSE) {
exit;
}
$this->load->library('similar_posts', null, 'similar_library');
- 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 recent_news_configure
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function recent_news_configure($action = 'show_settings', $widget_data = []) {
if ($this->dx_auth->is_admin() == FALSE) {
exit;
}
- 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 initModules
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function initModules() {
$query = $this->ci->cms_base->get_modules();
if ($query->num_rows() > 0) {
- 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
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function create() {
if ($this->input->post()) {
$id = $this->email->create();
if ($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 filterByEntityId
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function filterByEntityId($entityId = null, $comparison = null)
{
if (is_array($entityId)) {
$useMinMax = false;
if (isset($entityId['min'])) {
- 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 trash_list
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function trash_list() {
if ($this->input->post('urls')) {
$data = nl2br($this->input->post('urls'));
$data = explode('<br />', $data);
$data = array_map('trim', $data);
- 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 register
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function register($username, $password, $email, $address = '', $key, $phone = '', $login_user = TRUE) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (offset.bottom >= e.pageY) {
offset.right = offset.left + root.$trigger.outerWidth();
if (offset.right >= e.pageX) {
// reposition
root.position.call(root.$trigger, root, x, y);
- Create a ticketCreate a ticket
Function translateRole
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function translateRole($id, $lang) {
$sqlModel = 'SELECT id, alt_name, locale, description
FROM shop_rbac_roles_i18n
WHERE id = "' . $id . '" AND locale = "' . $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 getOldestFileToDelete
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getOldestFileToDelete() {
$files_ = $this->backupFiles();
// getting only files that allow to delete by pattern
$files = [];
foreach ($files_ 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
Function deleteOldFiles
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function deleteOldFiles() {
$term = $this->getSetting('backup_term');
$maxSize = ($this->getSetting('backup_maxsize') * 1024 * 1024);
$maxSize = 5 * 1024 * 1024;
- 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
Avoid deeply nested control flow statements. Open
if (opts.nowrap) return false;
- Create a ticketCreate a ticket
Function commonReset
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (moduleExists($domain)) {
$attributes = [
'name' => $domain,
'type' => 'modules',
'lang' => $locale,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!is_file(TEMPLATES_PATH . $file)) {
if (is_dir(TEMPLATES_PATH . $file . '/shop/')) {
$new_arr_shop[$file] = $file;
} else {
$new_arr[$file] = $file;
- Create a ticketCreate a ticket
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct() {
/*
* include composer autoloader
*/
- 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 showMessage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function showMessage($message, $title = FALSE, $class = '', $ret = false, $timeout = false) {
$del = [
"'",
'"',
];
- 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"