Showing 3,246 of 4,217 total issues
File yf_manage_dashboards.class.php
has 486 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Dashboards management.
*
Method api_payout
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Function _external_response
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
public function _external_response($options)
{
$pos_data = json_decode($options['posData'], true);
$operation_id = (int) ($pos_data['orderId']);
$ip = common()->get_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 copy_item2
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
public function copy_item2()
{
if ($_POST['items_to_copy']) {
$items = unserialize(urldecode($_POST['items_to_copy']));
foreach ((array) $items as $k => $v) {
- 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 49 (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 generate_down
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
public function generate_down($report = null, $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
File class_html_test.Test.php
has 480 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/yf_unit_tests_setup.php';
yf_model
has 53 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_model
{
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
yf_utils
has 53 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_utils
{
/**
* Catch missing method call.
* @param mixed $name
sample_html
has 53 functions (exceeds 20 allowed). Consider refactoring. Open
class sample_html
{
/***/
public function _init()
{
Method load_class_file
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load_class_file($class_name = '', $custom_path = '', $force_storage = '')
{
if (empty($class_name) || $class_name == 'main') {
return false;
}
Function split_sql
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function split_sql($sql)
{
$out = [];
// do not trim
$sql = rtrim($sql, "\n\r");
- 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
yf_debug
has 52 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_debug
{
public $SHOW_DB_QUERY_LOG = true;
public $SHOW_DB_STATS = false;
public $SHOW_DB_EXPLAIN_QUERY = true;
File city.data.php
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
0 => [
'city_id' => '14',
Method _url
has 182 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _url($params = [], $host = '', $url_str = '', $for_section = null)
{
if (DEBUG_MODE && ! $this->FORCE_NO_DEBUG) {
$time_start = microtime(true);
}
File static_pages.data.php
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
1 => [
'id' => '1',
Function _build
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public function _build($a, $class_rewrite)
{
$u = false;
if ( ! empty($class_rewrite->BUILD_RULES)) {
foreach ((array) $class_rewrite->BUILD_RULES as $func) {
- 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 render
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public function render($params = [])
{
if (DEBUG_MODE) {
$ts = microtime(true);
}
- 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 init_constants
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public function init_constants()
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
// Save current working directory (to restore it later when execute shutdown functions)
$this->_CWD = getcwd();
- 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
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$object = &$this->object;
$action = &$this->action;
$filter_name = &$this->filter_name;