Showing 3,246 of 4,217 total issues
Function join
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function join($table, $on, $join_type = '', $is_select = false)
{
$join_types = [
'left',
'right',
- Read upRead up
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 _add_revision
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function _add_revision($type, $action, $ids = false)
{
if (empty($ids) || empty($action) || empty($type)) {
return false;
}
- Read upRead up
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 _skip_by_pattern
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function _skip_by_pattern($path = '', $_is_dir = false, $pattern_include = '', $pattern_exclude = '')
{
if ( ! $path) {
return false;
}
- Read upRead up
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 _debug_DEBUG_YF
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _debug_DEBUG_YF(&$params = [])
{
if ( ! $this->SHOW_SETTINGS) {
return '';
}
Method product_set_edit
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function product_set_edit()
{
$product_set_id = (int) $_GET['id'];
$a = db()->from('shop_product_sets')->whereid($product_set_id)->get();
File yf_manage_payment_operation.class.php
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_manage_payment_operation
{
public $payment_api = null;
Method test_select_box
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_select_box()
{
$html = html();
$def_class = $html->CLASS_SELECT_BOX;
$def_opt_class = $html->CLASS_SELECT_OPTION_DEFAULT;
File yf_admin_modules.class.php
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Admin modules list handler.
*
Method api_payout
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($method, $options)
{
if ( ! $this->ENABLE) {
return null;
}
Function _on_validate_ok
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function _on_validate_ok($params = [], $form = null)
{
$p = $params ?: $_POST;
$lang = $p['lang_to'];
$lang_from = $p['lang_from'] ?: 'en';
- Read upRead up
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 edit
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function edit($params = [])
{
if (is_string($params)) {
$params = ['table' => $params];
}
- Read upRead up
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 _rewrite_replace_links
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function _rewrite_replace_links($body = '', $standalone = false, $force_rewrite = false, $for_site_id = false)
{
if (MAIN_TYPE_ADMIN && ! $force_rewrite) {
return $body;
}
- Read upRead up
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 add
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function add($object_name, $ids = [], $action = null, $extra = [])
{
if ( ! $this->ENABLED) {
return false;
}
- Read upRead up
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 text
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function text($name, $desc = '', $extra = [])
{
// Shortcut: use second param as $extra
if (is_array($desc)) {
$extra = (array) $extra + $desc;
- Read upRead up
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 _view_widget_items
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function _view_widget_items($name_ids = [], $items_configs = [])
{
$list_of_hooks = $this->_get_available_widgets_hooks();
$_orig_object = $_GET['object'];
- Read upRead up
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 _attrs
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function _attrs($extra, $names)
{
$body = [];
$a = [];
foreach ((array) $names as $name) {
- Read upRead up
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 yf_core_blocks.class.php
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Core blocks methods.
*
File yf_blocks.class.php
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Blocks editor.
*
File yf_db_utils_mysql.class.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
load('db_utils_driver', '', 'classes/db/');
class yf_db_utils_mysql extends yf_db_utils_driver
File sys_block_rules.data.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
1 => [
'id' => '1',