Showing 3,246 of 4,217 total issues
Function _check
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function _check($input = [], $user_info = [])
{
// Default banned status
$BANNED_STATUS = false;
// Nothing to check
- 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 allow
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function allow()
{
if ( ! $this->LOGGING || MAIN_TYPE_ADMIN) {
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 27 (exceeds 5 allowed). Consider refactoring. Open
public function _skip_by_pattern($path = '', $_type = 'f', $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
Function mkdir_m
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function mkdir_m($dir_name, $dir_mode = 0755, $create_index_htmls = 0, $start_folder = '')
{
if ( ! $dir_name || ! strlen($dir_name)) {
return 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 data_get_latest_currencies
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function data_get_latest_currencies()
{
$url = 'http://www.currency-iso.org/dam/downloads/table_a1.xml';
$f = __DIR__ . '/' . basename($url);
if (!file_exists($f)) {
- 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_response
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_response()
{
if ( ! $this->ENABLE) {
return null;
}
Method get_remote_page
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_remote_page($url = '', $cache_ttl = -1, $url_options = [], &$requests_info = [])
{
if (empty($url)) {
return false;
}
Method go
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function go($source_file_path = '', $dest_file_path = '', $LIMIT_X = -1, $LIMIT_Y = -1, $watermark_path = '', $ext = '')
{
$_prev_num_errors = count((array) main()->_all_core_error_msgs);
$LIMIT_X = (int) ($LIMIT_X != -1 ? $LIMIT_X : THUMB_WIDTH);
$LIMIT_Y = (int) ($LIMIT_Y != -1 ? $LIMIT_Y : THUMB_HEIGHT);
Method _data
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _data()
{
$_sub_action = [
'0' => '- не выбрано -',
'add' => 'добавить',
Method test_xss_clean
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_xss_clean()
{
$this->assertEquals(_class('security')->xss_clean('script'), 'script');
$this->assertEquals(_class('security')->xss_clean('<script'), '<script');
$this->assertEquals(_class('security')->xss_clean('<img src="javascript:alert(document.cookie)" />'), '<img />');
File states.data.php
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
1 => [
'id' => '1',
Method _prepare_invoice_body
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _prepare_invoice_body($order_id = false)
{
$_class_price = $this->_class_price;
$_class_units = $this->_class_units;
$_class_region = $this->_class_region;
File yf_email.class.php
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* High level html emails wrapper.
*/
Method _set_curl_options
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _set_curl_options($url_options = [], $is_ftp_url = false)
{
$curl_opts = [];
$user_agent = isset($url_options['user_agent']) ? $url_options['user_agent'] : $this->DEF_USER_AGENT;
Method _show
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _show($params = [])
{
// Set cookie
if (empty($_COOKIE['advertise']) && $_GET['ads_places'] == 1) {
Method products_show
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function products_show($search = '', $str_search = '')
{
foreach ((array) module('shop')->_shop_cats as $_cat_id => $_cat_name) {
if ($_GET['id'] == module('shop')->_shop_cats_all[$_cat_id]['url'] && $_GET['id'] != '') {
$_GET['id'] = $_cat_id;
Method _external_response
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _external_response($options)
{
$operation_id = $options['operation_id'];
$payment_code = $options['code'] ?: '';
$address = $options['address'] ?: '';
Function user_vars
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function user_vars()
{
if (isset($_GET['id']) && ! isset($_GET['page'])) {
$_GET['page'] = $_GET['id'];
$_GET['id'] = 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 combine
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function combine()
{
$assets = clone _class('assets');
$assets->clean_all();
$assets->ADD_IS_DIRECT_OUT = 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 form_row
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function form_row($content, $extra = [], $replace = [], $form)
{
$name = $extra['name'];
$is_html_array = (false !== strpos($name, '['));
if ($is_html_array) {
- 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"