Showing 3,246 of 4,217 total issues
Function _do
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _do($text = '', $params = [])
{
if ( ! strlen($text)) {
return '';
}
- 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 _netpbm_rotate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _netpbm_rotate($source_file_path, $dest_file_path, $LIMIT)
{
$PATH_TO_NETPBM = $this->FOUND_NETPBM_PATH;
$dest_file_path = $source_file_path;
// Check operation system
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
public function edit()
{
if ( ! $this->ENABLED_IMG_EDIT) {
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 _create_cloud
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _create_cloud($cloud_data = [], $params = [])
{
if (empty($cloud_data)) {
return '';
}
- 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 _netpbm_cut
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _netpbm_cut($source_file_path, $dest_file_path, $LIMIT_Width, $LIMIT_Height, $pos_left, $pos_top)
{
// Generate correct resize command for NetPBM library
$PATH_TO_NETPBM = $this->FOUND_NETPBM_PATH;
// $dest_file_path = $source_file_path;
- 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 pics_browser
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function pics_browser()
{
if (isset($_GET['active']) && $_GET['active'] == 1) {
$active = ' AND p.active = \'1\' ';
} elseif (isset($_GET['active']) && $_GET['active'] == 0) {
- 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 order_product_add_ajax
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function order_product_add_ajax()
{
if (empty($_POST['order_id']) || empty($_POST['product_id'])) {
return json_encode('ko');
}
- 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 _product_check_first_revision
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _product_check_first_revision($type = false, $ids = false)
{
$db = $this->get_revision_db($type);
if ($type == 'product_images') {
$sql = 'SELECT COUNT(*) as cnt FROM ' . $db . ' WHERE product_id=' . $ids;
- 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 show
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
if (main()->ADMIN_GROUP != 1) {
$admin_user = db()->get('SELECT * FROM ' . db('admin') . ' WHERE id=' . (int) main()->ADMIN_ID);
if ($admin_user['go_after_login']) {
- 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 coupon_add
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function coupon_add()
{
if (main()->is_post()) {
if ( ! $_POST['code']) {
_re('Code must be entered');
- 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_locale_stpl
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function edit_locale_stpl()
{
no_graphics(true);
if ( ! DEBUG_MODE || ! tpl()->ALLOW_INLINE_DEBUG) {
return print 'Access denied';
- 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 _get_methods_names_from_text
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _get_methods_names_from_text($text = '', $ONLY_PRIVATE_METHODS = false)
{
$methods = [];
if (empty($text)) {
return $methods;
- 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 _data
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _data()
{
$_sub_action = [
'0' => '- не выбрано -',
'load' => 'загрузить',
- 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 _init
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _init()
{
$supplier = db()->get('SELECT supplier_id, main_cat_id FROM ' . db('shop_admin_to_supplier') . ' WHERE admin_id=' . (int) (main()->ADMIN_ID));
if ($supplier['supplier_id']) {
$this->SUPPLIER_ID = $supplier['supplier_id'];
- 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 filter_save
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function filter_save()
{
$_GET['id'] = preg_replace('~[^0-9a-z_]+~ims', '', $_GET['id']);
if ($_GET['id'] && false !== strpos($_GET['id'], $_GET['object'] . '__')) {
$filter_name = $_GET['id'];
- 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 _site_map_items
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _site_map_items($sm_obj)
{
if ( ! is_object($sm_obj)) {
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 _get_recursive_cat_ids
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _get_recursive_cat_ids($cat_id = 0, $all_cats = false)
{
$cat_id = (int) $cat_id;
if (empty($all_cats)) {
$all_cats = conf('all_cats');
- 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 novaposhta_ua__import_old
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function novaposhta_ua__import_old()
{
// get data
// $file = '/tmp/warenhouses_ru.xls';
// $content = file_get_contents( $file );
- 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 _cache_fetch
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function _cache_fetch()
{
$cache = &$this->cache;
// category
$items = db()->from('sys_category_items')->where('cat_id', '=', $this->set_cat_id)->order_by('name')->all();
- 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 _save_upload_list
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function _save_upload_list($data = null)
{
$upload_list__file_name = $this->upload_list__file_name;
$upload_list__field = $this->upload_list__field;
$upload_list = &$this->upload_list;
- 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"