Showing 3,246 of 4,217 total issues
Method _go
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _go($location, $rewrite = true, $redirect_type = 'hybrid', $text = '', $ttl = 3, $params = [])
{
if (is_array($location)) {
$params += $location;
$rewrite = isset($params['rewrite']) ? $params['rewrite'] : $rewrite;
File shop_orders.sql_php.php
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
return [
'fields' => [
'id' => [
yf_locale_editor
has 41 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_locale_editor
{
/** @var array @conf_skip */
private static $HELP = [
'edit' => [
File yf_user_modules.class.php
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* User modules list handler.
*
File yf_payment.class.php
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_payment
{
public $URL_REDIRECT = '/payment';
File yf_table2_filter.class.php
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Table2 plugin.
*/
Method _on_validate_ok
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _on_validate_ok($params = [], $form)
{
$p = $params ?: $_POST;
$f = $_FILES['file'];
Function add
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function add($params = [])
{
if (is_string($params)) {
$params = ['table' => $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
Function _do_login
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function _do_login($params = [])
{
$AUTH_LOGIN = trim($params['login']);
$AUTH_PSWD = trim($params['pswd']);
- 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 num2str
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function num2str($float, $currency_id = null, $lang_id = null, $set = false)
{
$lang_id = $this->lang_id($lang_id, $set);
$currency_id = $this->currency_id($currency_id, $set);
$words = &$this->words[$lang_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
Method _operation
has 135 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, '');
// var
Method payment
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function payment($options)
{
if ( ! $this->ENABLE) {
return null;
}
Method api_payout
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Method _email_verify
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _email_verify($email = '', $check_mx = false, $check_by_smtp = false, $check_blacklists = false)
{
if (empty($email)) {
return false;
}
Method _edit
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _edit($params = [])
{
if (empty(main()->USER_ID) && MAIN_TYPE_USER) {
return _error_need_login();
}
Function _process_sub_patterns
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _process_sub_patterns($text = '', $args = [])
{
if (false === strpos($text, '{') || ! is_array($args)) {
return $text;
}
- 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_menu
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _show_menu($input = [])
{
$RETURN_ARRAY = isset($input['return_array']) ? $input['return_array'] : false;
$force_stpl_name = isset($input['force_stpl_name']) ? $input['force_stpl_name'] : false;
$menu_name = $input['name'];
- 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 _recursive_get_methods_from_extends
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _recursive_get_methods_from_extends($file_text = '', $user_module_name = '', $_type = 'admin', $ONLY_PRIVATE_METHODS = false)
{
$extends_file_path = '';
$methods = [];
// TODO: connect plugins
- 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 _prepare_cond_text
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _prepare_cond_text($cond = '', $replace = [], $stpl_name = '', $for_right = false)
{
$prepared_array = [];
$cond = str_replace("\t", '', trim($cond));
foreach (explode(' ', $cond) as $val) {
- 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 _process_replaces
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _process_replaces($string, array &$replace, $name = '')
{
if ( ! strlen($string) || false === strpos($string, '{')) {
return $string;
}
- 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"