Showing 3,246 of 4,217 total issues
Function multi_check_box
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function multi_check_box($name, $values = [], $selected = [], $horizontal = true, $type = 2, $add_str = '', $translate = 0, $name_as_array = false)
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = $extra['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 _do_login
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function _do_login()
{
$AUTH_LOGIN = trim($_POST[$this->LOGIN_FIELD]);
$AUTH_PSWD = trim($_POST[$this->PSWD_FIELD]);
- 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_add_custom_fields
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function _render_add_custom_fields(&$params, &$data, &$ids)
{
if ( ! $data || ! $ids || ! $params['custom_fields']) {
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 _currency_convert
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function _currency_convert($number = 0, $c_from = '', $c_to = '')
{
if ( ! $number || ! $c_from || ! $c_to) {
return $number;
}
- 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 _store_item
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function _store_item($data = [])
{
if (is_string($data) && strlen($data)) {
$data = ['url' => $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
Method show
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$object = &$this->object;
$action = &$this->action;
$filter_name = &$this->filter_name;
Method _show_for_object_tree
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _show_for_object_tree($params = [])
{
$OBJECT_NAME = ! empty($params['object_name']) ? $params['object_name'] : $_GET['object'];
$OBJECT_ID = ! empty($params['object_id']) ? (int) ($params['object_id']) : (int) ($_GET['id']);
$STPL_NAME_MAIN = ! empty($params['stpl_main']) ? $params['stpl_main'] : 'comments/main_tree';
Method conf
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
function conf($name = null, $new_value = null, $_arr_name = '')
{
$_arr_sub = null;
if ( ! $_arr_name) {
$_arr_name = 'CONF';
yf_db_migrator
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class yf_db_migrator
{
/**
* Catch missing method call.
* @param mixed $name
Method _show_menu
has 112 lines of code (exceeds 25 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'];
File yf_utf8.class.php
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Unicode methods.
*
Method _recreate
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _recreate($options = null)
{
// import operation
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// var
Method compact_info
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compact_info()
{
main()->NO_GRAPHICS = true;
conf('no_ajax_here', true);
// Check user id
Function multi_select
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function multi_select($name, $values = [], $selected = '', $show_text = false, $type = 2, $add_str = '', $translate = 0, $level = 0, $disabled = false)
{
// Passing params as array
if (is_array($name)) {
$extra = (array) $extra + $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 show
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$a = $this->_get_page_from_db();
if ( ! $a) {
return _404();
- 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_for_object_tree
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function _show_for_object_tree($params = [])
{
$OBJECT_NAME = ! empty($params['object_name']) ? $params['object_name'] : $_GET['object'];
$OBJECT_ID = ! empty($params['object_id']) ? (int) ($params['object_id']) : (int) ($_GET['id']);
$STPL_NAME_MAIN = ! empty($params['stpl_main']) ? $params['stpl_main'] : 'comments/main_tree';
- 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 jquery_sparklines
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function jquery_sparklines($data, $extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
if ( ! is_array($data) || ! $data) {
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 scan_dir
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
function scan_dir($start_dir, $FLAT_MODE = true, $include_pattern = '', $exclude_pattern = '')
{
if ( ! file_exists($start_dir)) {
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
Method show
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show($out_type, $params = [])
{
if ( ! $out_type || ! in_array($out_type, $this->supported_out_types)) {
throw new Exception('Assets: unsupported out content type: ' . $out_type);
return null;
Method _init
has 110 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');