Showing 3,246 of 4,217 total issues
Function _get_items_array
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _get_items_array($cat_name = '', $recursive_sort = true, $all = false)
{
if (empty($cat_name)) {
$cat_name = $this->_default_cats_block;
}
- 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
File yf_db_installer.class.php
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Database structure installer core.
*/
Method _render_get_data
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _render_get_data(&$params)
{
$default_per_page = MAIN_TYPE_USER ? conf('user_per_page') : conf('admin_per_page');
if ($params['rotate_table']) {
$default_per_page = 10;
Method strip_tags_smart
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
function strip_tags_smart(
/*string*/ $s,
array $allowable_tags = null,
/*boolean*/ $is_format_spaces = true,
array $pair_tags = ['script', 'style', 'map', 'iframe', 'frameset', 'object', 'applet', 'comment', 'button'],
Method compare_table
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compare_table($t1, $t2, $db_prefix)
{
$prefix_len = strlen($db_prefix);
$columns = [];
$indexes = [];
Method translate_string
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function translate_string($in, $args = 0, $lang = '')
{
if ( ! $in) {
return $in;
}
Method init_constants
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init_constants()
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
// Save current working directory (to restore it later when execute shutdown functions)
$this->_CWD = getcwd();
Function _prepare_to_save
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function _prepare_to_save($a)
{
$to_save = [];
foreach ((array) $a as $k => $v) {
if (is_string($v) && ! strlen($v)) {
- 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 join_url
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function join_url($parts, $encode = null)
{
if ($encode === null) {
$encode = $this->AUTO_ENCODE_DECODE;
}
- 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 go
has a Cognitive Complexity of 32 (exceeds 5 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);
- 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 go
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function go()
{
if ( ! $this->LOGGING || MAIN_TYPE_USER) {
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 _process_patterns
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _process_patterns($name, array $replace, $string)
{
$_this = $this;
$start = '<' . '?p' . 'hp ';
Method init
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
// Chained config rule
if ($this->BLOCK_FAILED_LOGINS) {
$this->LOG_FAILED_LOGINS = true;
Method show
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$object = &$this->object;
$action = &$this->action;
$filter_name = &$this->filter_name;
Method error_handler
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function error_handler($error_type, $error_msg, $error_file, $error_line)
{
// quickly turn off notices logging
if ($this->NO_NOTICES && ($error_type == E_NOTICE || $error_type == E_USER_NOTICE)) {
return true;
File yf_cats.class.php
has 361 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Category display handler.
*
Method login
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function login($provider, $params = [])
{
if ( ! $provider) {
return false;
}
Method _upload_item__import_test
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _upload_item__import_test($options)
{
// load import data
$_ = $options;
$id = $_['id'];
File yf_manage_notifications.class.php
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class yf_manage_notifications
{
public $RECEIVER_TYPES = [
Method view
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
// check operation
$operation = $this->_operation();
// import options