Showing 3,246 of 4,217 total issues
Function query
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function query($sql, $need_meta = false)
{
if (empty($sql)) {
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_db_utils_helper_create_table.class.php
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_db_utils_helper_create_table
{
File yf_site_map.class.php
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Site Map Generator (implementation of the http://www.sitemaps.org/protocol.php).
*
File yf_comments_manage.class.php
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Comments management.
*/
Method _operation
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _operation($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// class
File yf_core_menu.class.php
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Menu API methods.
*
Consider simplifying this complex logical expression. Open
if (( ! is_array($rule_info['methods']) || $matched_method)
&& ( ! is_array($rule_info['user_groups']) || $matched_user_group)
&& ( ! is_array($rule_info['themes']) || $matched_theme || ! $CUR_USER_THEME)
&& ( ! is_array($rule_info['locales']) || $matched_locale || ! $CUR_LOCALE)
&& ( ! is_array($rule_info['site_ids']) || $matched_site || ! $CUR_SITE)
File sys_log_redirects.sql_php.php
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
Method _process_ifs
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _process_ifs($string = '', array &$replace, $stpl_name = '')
{
if (false === strpos($string, '{/if}') || empty($string)) {
return $string;
}
Method test_check_box
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_check_box()
{
$html = html();
$def_class = $html->CLASS_LABEL_CHECKBOX . ' ' . $html->CLASS_LABEL_CHECKBOX_INLINE;
Function get_asset_from_bower
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function get_asset_from_bower($name, $version = 'master', $asset_data = [], $asset_type)
{
if ( ! $name || ! $asset_data || ! isset($asset_data[$asset_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 search_used
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function search_used()
{
$exclude_paths = [
'*/.git/*',
'*/.dev/*',
- 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_block
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _show_block($input = [])
{
if ( ! isset($this->_blocks_infos)) {
$this->_blocks_infos = main()->get_data('blocks_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 _db_change_if_ok
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _db_change_if_ok($table, $fields, $type, $extra = [])
{
$func = function ($table, $fields, $type, $extra, $form) {
if ( ! $table || ! $type || empty($_POST)) {
return $form;
- 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_update_batch_sql
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _get_update_batch_sql($table, $values, $index)
{
$ids = [];
$final = [];
$where = [];
- 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 _parse
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _parse($host, $url, $query, $url_str, $class_rewrite)
{
$s = '';
if (false !== strpos($url[0], '%')) {
$url[0] = urldecode($url[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 _check_ip
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _check_ip($ip, $ignore_ips = '', $check_type = 'force')
{
$masks = [
'0.0.0.0/8', // Current network (only valid as source address) RFC 1700
'10.0.0.0/8', // Private network RFC 1918
- 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 _try_to_find
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _try_to_find($input_name = '', $CUR_CHECKS = [], $where_search = '')
{
// Default value
$IS_FOUND = false;
$WHAT_FOUND = '';
- 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 _is_spider
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _is_spider($ip = '', $ua = '')
{
$CHECK_IP = false;
$CHECK_UA = false;
if ($ip && preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $ip)) {
- 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 33 (exceeds 5 allowed). Consider refactoring. Open
public function go($new_file_path, $name_in_form = 'image', $max_image_size = 0, $is_local = false)
{
// We do not want to user break our operation
ignore_user_abort(true);
// New name is required
- 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"