Showing 3,246 of 4,217 total issues
Method multi_select
has 70 lines of code (exceeds 25 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;
Method connect
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function connect($db_host = '', $db_user = '', $db_pswd = null, $db_name = null, $force = false, $params = [])
{
if (is_array($db_host)) {
$params = $db_host;
$db_host = '';
Method _try_to_find
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _try_to_find($input_name = '', $CUR_CHECKS = [], $where_search = '')
{
// Default value
$IS_FOUND = false;
$WHAT_FOUND = '';
Method _order_create
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _order_create()
{
if (empty($_POST)) {
return false;
}
Method go
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function go()
{
if ( ! db()->QUERY_LOG) {
return false;
}
Method tree
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function tree()
{
return _class('html')->tree([
11 => [
'name' => 'Tools',
Method menu
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function menu()
{
return _class('html')->menu([
11 => [
'name' => 'Tools',
Method radio_box
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function radio_box($name, $values = [], $selected = '', $horizontal = true, $type = 2, $add_str = '', $translate = 0)
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = $extra['name'];
Method get_asset_from_bower
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_asset_from_bower($name, $version = 'master', $asset_data = [], $asset_type)
{
if ( ! $name || ! $asset_data || ! isset($asset_data[$asset_type])) {
return false;
}
Method _api_response
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _api_response($request)
{
if ( ! $this->ENABLE) {
return null;
}
Method drag_items
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drag_items()
{
if (empty($_GET['id'])) {
return _e('No id!');
}
Method view
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$id = (int) $_GET['id'];
if ($id) {
$a = db()->from(self::table)->whereid($id)->get();
Method btn
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function btn($name, $link, $extra = [])
{
if (is_array($link)) {
$extra = $link;
$link = '';
Method _view_widget_items
has 69 lines of code (exceeds 25 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'];
Function connect
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function connect($params = [])
{
$this->_connected_ok = false;
$ext_old_allowed = $this->FORCE_EXT ? in_array($this->FORCE_EXT, ['old', 'memcache']) : 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_lang_get_vars_from_files
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function _load_lang_get_vars_from_files($lang)
{
$files = [];
// Auto-find shared language vars. They will be connected in order of file system
// Names can be any, but better to include lang name into file name. Examples:
- 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 menu
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function menu($data = [], $extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
if ($data) {
$data = $this->_recursive_sort_items($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
Function view
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function view()
{
// check operation
$operation = $this->_operation();
// import options
- 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_daily_stats
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function _get_daily_stats($type = 'sum', $days = null)
{
$time = time();
$days = $days ?: 60;
$min_time = $time - $days * 86400;
- 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_dir_contents
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function _get_dir_contents($abs_dir_name)
{
$contents = [
'dirs' => [],
'files' => [],
- 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"