Showing 3,246 of 4,217 total issues
Function _api_transaction
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function _api_transaction($options)
{
if ( ! $this->ENABLE) {
return null;
}
- 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 _validate_rules_process
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function _validate_rules_process($validate_rules = [], &$data)
{
$validate_ok = true;
foreach ((array) $validate_rules as $name => $rules) {
$is_required = 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 _request
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function _request($url, $post = null, $options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// options
- 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 ajax_validate
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function ajax_validate()
{
no_graphics(true);
header('X-Robots-Tag: noindex, nofollow, noarchive, nosnippet');
- 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_api.class.php
has 509 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/***
* module: api
*
Method _operation
has 204 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _operation($options = null)
{
// var
$is_valid = true;
$is_options = true;
Function generate_up
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
public function generate_up($params = [])
{
if ( ! isset($report)) {
$report = $this->compare($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 _process
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
public function _process($params = [])
{
// THESE ARE REQUIRED!
$SOURCE_ARRAY = $params['source_array'];
$TABLE_NAME = $params['table_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
Function _generate_sitemap
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
public function _generate_sitemap()
{
main()->NO_GRAPHICS = true;
if ( ! $this->SITE_MAP_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
Method _show_filter
has 202 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _show_filter()
{
if ( ! in_array($_GET['action'], $this->_avail_filters)) {
return false;
}
File tips.data.php
has 501 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
1 => [
'id' => '1',
Function show
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
public function show($out_type, $params = [])
{
if ( ! $out_type || ! in_array($out_type, $this->supported_out_types)) {
throw new Exception('Assets: unsupported out content type: ' . $out_type);
return null;
- 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
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
public function _get_methods($params = [])
{
$ONLY_PRIVATE_METHODS = [];
if (isset($params['private'])) {
$ONLY_PRIVATE_METHODS = $params['private'];
- 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 write_string
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
public function write_string($server_info = [], $string = '', $remote_file = '')
{
$remote_file = _class('ssh')->_prepare_path($remote_file);
if ( ! _class('ssh')->_INIT_OK || ! $server_info || ! $string || ( ! strlen($remote_file) && ! is_array($string))) {
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 api_payout
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Function _recursive_get_menu_items
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function _recursive_get_menu_items($menu_id = 0, $skip_item_id = 0)
{
if (empty($menu_id) || empty($this->_menu_items[$menu_id])) {
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
File yf_model.class.php
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
load('yf_model_result', '', 'classes/model/');
load('yf_model_relation', '', 'classes/model/');
File yf_graphics.class.php
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Core content-related methods stored here.
*
yf_manage_shop_import_products2
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_manage_shop_import_products2
{
public $import_field = [
0 => 'не использовать (0)',
'id' => 'идентификатор (id)',
class_db_real_utils_pgsql_test
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
class class_db_real_utils_pgsql_test extends db_real_abstract
{
public static function _need_skip_test($name)
{
return false;