Showing 3,246 of 4,217 total issues
Method _api_response
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_response()
{
if ( ! $this->ENABLE) {
return null;
}
Method _get_modules_from_files
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _get_modules_from_files($include_framework = true, $with_sub_modules = false)
{
$user_modules_array = [];
$pattern_include = '-f ~/' . preg_quote(USER_MODULES_DIR, '~') . '.*' . preg_quote(YF_CLS_EXT, '~') . '$~';
$pattern_no_submodules = '~/' . preg_quote(USER_MODULES_DIR, '~') . '[^/]+' . preg_quote(YF_CLS_EXT, '~') . '$~ims';
Method edit
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit($params = [])
{
if (is_string($params)) {
$params = ['table' => $params];
}
File class_db_real_installer_mysql_test.Test.php
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once __DIR__ . '/db_real_abstract.php';
/**
Method go
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function go($new_file_path, $k, $name_in_form = 'image', $max_image_size = 0, $is_local = false)
{
// We do not want to user break our operation
ignore_user_abort(true);
Function _operation
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function _operation($options = null)
{
// var
$is_valid = true;
$is_options = 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 load
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function load($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// var
- 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 _compile_if_funcs
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function _compile_if_funcs(array $m)
{
$cond = trim($m['cond']);
$multiple_cond = 'AND';
if (in_array($cond, ['if_or', 'elseif_or'])) {
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
public function _get_modules_from_files($include_framework = true, $with_sub_modules = false)
{
$modules = [];
$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 get_user_info
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function get_user_info()
{
if (DEBUG_MODE && $_GET['oauth_clean']) {
$this->_storage_clean();
}
- 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_rss_page
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function show_rss_page($data = [], $params = [])
{
require_php_lib('yf_feedcreator');
$rss = new UniversalFeedCreator();
if ( ! isset($params['use_cached']) || ! empty($params['use_cached'])) {
- 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 _perm_str2num
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function _perm_str2num($perm = '')
{
$perm_len = strlen(trim($perm));
if ($perm_len > 10 && $perm_len < 9) {
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 init_server_id
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function init_server_id()
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
$servers = $this->get_data('servers');
$this->SERVER_ID = 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 wordwrap
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function wordwrap($str, $width = 75, $break = "\n", $cut = false)
{
$splitedArray = [];
$lines = explode("\n", $str);
foreach ((array) $lines as $line) {
- 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
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$id = preg_replace('~[^a-z0-9_-]+~ims', '', $_GET['id']);
$method = preg_replace('~[^a-z0-9_-]+~ims', '', $_GET['page']);
if (strlen($id)) {
- 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 my_array_merge
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function my_array_merge($a1, $a2)
{
foreach ((array) $a2 as $k => $v) {
if (isset($a1[$k]) && is_array($a1[$k])) {
if (is_array($a2[$k])) {
- 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 _external_response
has 89 lines of code (exceeds 25 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();
File yf_form2_boxes.class.php
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_form2_boxes
{
Method send
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function send($params = [])
{
$driver = strtolower($params['driver'] ?: $this->DRIVER);
if (DEBUG_MODE || $this->LOG_EMAILS) {
$time_start = microtime(true);
Method scan_dir
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function scan_dir($server_info = [], $start_dir = '', $pattern_include = '', $pattern_exclude = '', $level = 0, $single_file = '')
{
if (is_array($start_dir)) {
$_merged_contents = [];
foreach ((array) $start_dir as $_start_dir) {