Showing 3,246 of 4,217 total issues
Function _correct_protocol
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _correct_protocol($url)
{
if ( ! strlen($url)) {
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 _data
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _data()
{
$_sub_action = [
'0' => '- не выбрано -',
'add' => 'добавить',
- 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 _view_widget_items
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function _view_widget_items($name_ids = [], $items_configs = [])
{
$list_of_hooks = $this->_get_available_widgets_hooks();
$_orig_object = $_GET['object'];
- 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 substr
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function substr($text, $start, $length = null)
{
if ($this->MULTIBYTE == $this->UNICODE_MULTIBYTE) {
return $length === null ? mb_substr($text, $start) : mb_substr($text, $start, $length);
}
- 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 _get_template_file
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _get_template_file($file_name = '', $force_storage = '', $JUST_CHECK_IF_EXISTS = false, $RETURN_TEMPLATE_PATH = false)
{
$string = false;
$NOT_FOUND = false;
$storage = 'inline';
File yf_tpl_driver_yf_compile.class.php
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Framework template engine compile extension code.
*
File yf_manage_redis.class.php
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_manage_redis
{
public $types = [
yf_tpl
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class yf_tpl
{
/** @var string @conf_skip Path to the templates (including current theme path) */
public $TPL_PATH = '';
/** @var string default template name */
Method ui_range
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ui_range($name, $desc = '', $extra = [], $replace = [], $form)
{
if (is_array($desc)) {
$extra += $desc;
$desc = '';
Method mail
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function mail($options = null)
{
// DEBUG
// ini_set( 'html_errors', 0 );
// var_dump( $options );
File yf_admin.class.php
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Admin users manager.
*
Method show
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$i = preg_replace('~[^a-z0-9_-]+~ims', '', trim($_GET['i'])); // instance
$g = preg_replace('~[^a-z0-9_-]+~ims', '', trim($_GET['g'])); // group
$t = preg_replace('~[^a-z0-9_-]+~ims', '', trim($_GET['t'])); // type
Function api_payout
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function api_payout($options = null)
{
if ( ! $this->ENABLE) {
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 _recursive_get_methods_from_extends
has a Cognitive Complexity of 34 (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 send
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function send($params = [])
{
$driver = strtolower($params['driver'] ?: $this->DRIVER);
if (DEBUG_MODE || $this->LOG_EMAILS) {
$time_start = 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 query
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function &query($sql)
{
if ( ! $this->_connected && ! $this->connect()) {
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 _set_curl_options
has a Cognitive Complexity of 34 (exceeds 5 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;
- 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 34 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
conf('_login_form_displayed', true);
if ( ! empty($_POST)) {
if (empty($_POST['login']) && empty($_POST['email'])) {
- 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 compact_info
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function compact_info()
{
main()->NO_GRAPHICS = true;
conf('no_ajax_here', true);
// Check user 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 _process_text
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function _process_text($body = '', $no_smilies = false, $smilies_as_image = false)
{
if (empty($body)) {
return '';
}
- 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"