Showing 4,217 of 4,217 total issues
Function shell_exec
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function shell_exec($server_info = [], $cmd = '')
{
if ( ! $this->_INIT_OK || ! $cmd || ! $server_info) {
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 download_dir
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function download_dir($server_info = [], $remote_dir = '', $local_dir = '', $pattern_include = '', $pattern_exclude = '', $level = null)
{
$local_dir = _class('ssh')->_prepare_path($local_dir);
$remote_dir = _class('ssh')->_prepare_path($remote_dir);
if ( ! _class('ssh')->_INIT_OK || ! $server_info || ! strlen($local_dir) || ! strlen($remote_dir)) {
- 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 drag_items
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function drag_items()
{
$cat_info = db()->get('SELECT * FROM ' . db('categories') . ' WHERE name="' . db()->es($_GET['id']) . '" OR id=' . (int) ($_GET['id']));
if ( ! $cat_info) {
return _e('No such category');
- 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 orders
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function orders()
{
if ( ! main()->USER_ID) {
if (main()->is_post()) {
module('shop')->order_validate_data();
- 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 18 (exceeds 5 allowed). Consider refactoring. Open
public function _data()
{
$_class_price = $this->_class_price;
// init sql
$sql_table = db('shop_products');
- 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_modules_from_files
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function _get_modules_from_files()
{
$regex = '~function(\s)+(' . implode('|', $this->HOOK_NAMES) . ')\s*\(~ims';
$yf_prefix_len = strlen(YF_PREFIX);
- 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 scan_dir
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function scan_dir($start_dir, $_tmp = 1, $pattern_include = '', $pattern_exclude = '')
{
$func = __FUNCTION__;
// Here we accept several start folders, result will be merged
if (is_array($start_dir)) {
- 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 replace
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function replace($start_dirs, $pattern_include = '', $pattern_exclude = '', $pattern_find, $pattern_replace)
{
$files = [];
if ( ! is_array($start_dirs)) {
$start_dirs = [$start_dirs];
- 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_image_versions
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function create_image_versions($uploads_result = null, $options = null)
{
if ( ! is_array($uploads_result) || ! is_array($options['image_versions'])) {
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 getset
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getset($name, callable $func, $ttl = 0, array $params = [])
{
if ( ! is_string($name) || ! $name) {
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 save
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function save($output_file = '')
{
if (empty($this->tmp_img)) {
if ( ! $this->SILENT_MODE) {
trigger_error('No temporary image for resizing!', E_USER_WARNING);
- 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 grep
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function grep($pattern_find, $start_dirs, $pattern_path = '*', $extra = [])
{
if ( ! $pattern_find) {
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_oauth_driver1.class.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
load('oauth_driver2', '', 'classes/oauth/');
abstract class yf_oauth_driver1 extends yf_oauth_driver2
{
Method _init
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _init()
{
// class
$this->payment_api = _class('payment_api');
$this->manage_payment_lib = module('manage_payment_lib');
Method _combine_content
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _combine_content(array $out, $out_type, array $to_combine, $combined_file, array $md5_inside_combined)
{
if ( ! file_exists($combined_file)) {
$divider = PHP_EOL;
if ($out_type === 'js') {
Method stats
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function stats()
{
$payment_api = &$this->payment_api;
// payment providers
$providers = $payment_api->provider();
Method _api_WebMoney
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _api_WebMoney($title)
{
$php = '';
$api = _class('payment_api__provider_webmoney');
$methods = [
Method _check_block_rights
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _check_block_rights($block_id = 0, $OBJECT = '', $ACTION = '')
{
if (empty($block_id) || empty($OBJECT)) {
return false;
}
Method _fix_data_safe
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _fix_data_safe($table, $data = [], $extra = [])
{
if ( ! $this->FIX_DATA_SAFE) {
return $data;
}
Method merge_order
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function merge_order()
{
$_GET['id'] = (int) ($_GET['id']);
if ($_GET['id']) {
$order_info = db()->query_fetch('SELECT * FROM ' . db('shop_orders') . ' WHERE id=' . (int) ($_GET['id']));