Showing 3,246 of 4,217 total issues
Function tip
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function tip($in = null, $extra = [])
{
if ( ! is_array($extra)) {
$extra = [];
}
- 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 _do_debug_db_connection_queries
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function _do_debug_db_connection_queries($db, $connect_trace = [])
{
if ( ! $this->SHOW_DB_QUERY_LOG) {
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
Method write_string
has 106 lines of code (exceeds 25 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;
Method test_complex
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_complex()
{
$to_merge_1 = [
'auth_user' => [
'EXEC_AFTER_LOGIN' => [
Method tasks
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function tasks($allowed_check = false)
{
$main = main();
if ($main->is_console() || $main->is_ajax()) {
$main->no_graphics(true);
File articles_texts.data.php
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
7 => [
'id' => '7',
yf_payment_api__provider_remote
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_payment_api__provider_remote
{
public $ENABLE = null;
public $TEST_MODE = null;
sample_core_api
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class sample_core_api
{
public function _init()
{
_class('core_api')->SOURCE_ONLY_FRAMEWORK = true;
File yf_static_pages.class.php
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Static/HTML pages content editor.
*
File yf_core_errors.class.php
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Custom error handler.
*
File sys_category_items.sql_php.php
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
Method csv_ecommpay
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function csv_ecommpay($options = null)
{
$operation_id = &$_POST['operation_id'];
if ( ! is_array($operation_id) || count($operation_id) < 1) {
common()->message_info('Отсутствуют данные');
Method _generate_sitemap
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _generate_sitemap()
{
main()->NO_GRAPHICS = true;
if ( ! $this->SITE_MAP_ENABLED) {
return false;
Method _validate_rules_cleanup
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _validate_rules_cleanup($validate_rules = [])
{
// Trim names with spaces
foreach ((array) $validate_rules as $name => $raw) {
$trimmed = trim($name);
File class_db_real_migrator_mysql.Test__off__.php
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/db_real_abstract.php';
/**
Function _tree_items
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function _tree_items(&$data, $extra = [])
{
if ($extra['show_controls'] && ! is_callable($extra['show_controls'])) {
$r = [
'edit_link' => isset($extra['edit_link']) ? $extra['edit_link'] : url('/@object/edit_item/%d/@page'),
- 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 go
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function go()
{
if ( ! db()->QUERY_LOG) {
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 _loop_detected
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function _loop_detected($cur_url)
{
if ( ! $this->LOOP_DEFENCE) {
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_for_object
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _show_for_object($params = [])
{
if ($this->USE_TREE_MODE) {
return $this->_show_for_object_tree($params);
}
Method _process_where
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _process_where(array $where, $func_name = 'where', $return_array = false)
{
$sql = '';
if ($count = count((array) $where)) {
$all_numeric = $this->_is_where_all_numeric($where);