Showing 3,246 of 4,217 total issues
Function object_get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
function object_get($object, $key, $default = null)
{
if ($key === null || trim($key) == '') {
return $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 _build_inherit_parents
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
function _build_inherit_parents($parent = '')
{
$next_parent = $GLOBALS['INHERIT_TREE'][$parent];
$parents = [];
- 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
Avoid deeply nested control flow statements. Open
Open
if (preg_last_error() !== PREG_NO_ERROR) {
$i = 999;
break;
}
Method _show_avatar
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function _show_avatar($user_id = 0, $user_name = '', $as_link = 0, $is_middle = 0, $only_img_src = 0, $force_link = '')
Consider simplifying this complex logical expression. Open
Open
if( is_payout ) {
value = $scope.payment.payout_limit_min || value;
var _value = ( $scope.action.payout &&
$scope.action.payout.method &&
$scope.action.payout.method.amount &&
Consider simplifying this complex logical expression. Open
Open
if (is_string($_submit) || is_string($action)) {
$expanded = 'false';
! @$_is_action && $expanded_in = '';
// form
$form = '';
Consider simplifying this complex logical expression. Open
Open
if (in_array($_storage, ['app', 'project', 'framework'])) {
$_theme = $_storage == 'framework' ? MAIN_TYPE : $theme;
if (isset($paths[$_storage][$_theme])) {
$file_path = $paths[$_storage][$_theme];
}
Consider simplifying this complex logical expression. Open
Open
if (($count === 3 || $count === 2) && is_string($where[0]) && (is_string($where[1]) || is_numeric($where[1]) || is_array($where[1]))) {
if ( ! preg_match(self::REGEX_INLINE_CONDS, $where[0]) && ! preg_match(self::REGEX_INLINE_CONDS, $where[1])) {
$sql = $this->_process_where_cond($where[0], $where[1], $where[2]);
}
}
Consider simplifying this complex logical expression. Open
Open
if ($url[0] == 'login' || $url[0] == 'logout') {
$s = 'task=' . $url[0];
if (isset($url[1])) {
$s .= '&id=' . $url[1];
unset($url[1]);
Consider simplifying this complex logical expression. Open
Open
if ((defined('FORCE_RESIZE_IMAGE_SIZE') && filesize($photo_path) > FORCE_RESIZE_IMAGE_SIZE)
|| defined('FORCE_RESIZE_WIDTH') && $real_image_info[0] > FORCE_RESIZE_WIDTH
|| defined('FORCE_RESIZE_HEIGHT') && $real_image_info[1] > FORCE_RESIZE_HEIGHT
) {
return common()->make_thumb($photo_path, $photo_path, $LIMIT_X, $LIMIT_Y);
Consider simplifying this complex logical expression. Open
Open
if ((defined('FORCE_RESIZE_IMAGE_SIZE') && filesize($photo_path) > FORCE_RESIZE_IMAGE_SIZE)
|| defined('FORCE_RESIZE_WIDTH') && $real_image_info[0] > FORCE_RESIZE_WIDTH
|| defined('FORCE_RESIZE_HEIGHT') && $real_image_info[1] > FORCE_RESIZE_HEIGHT
) {
return common()->make_thumb($photo_path, $photo_path, $LIMIT_X, $LIMIT_Y);
Consider simplifying this complex logical expression. Open
Open
if ($_POST['year_birth'] >= 1915 && $_POST['year_birth'] <= (date('Y') - 17)
&& $_POST['month_birth'] >= 1 && $_POST['month_birth'] <= 12
&& $_POST['day_birth'] >= 1 && $_POST['day_birth'] <= 31
) {
if ($_POST['month_birth'] < 10) {
Method time_box2
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function time_box2($name, $selected = '', $add_str = '', $show_text = 1, $translate = 1)
Method _combine_content
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function _combine_content(array $out, $out_type, array $to_combine, $combined_file, array $md5_inside_combined)
Method set_content
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function set_content($asset_type, $md5, $content_type, $content, $params = [])
Method check_box
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function check_box($name = '', $value = '', $selected = '', $add_str = '', $extra = [])
Method time_box2
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function time_box2($name, $selected = '', $add_str = '', $show_text = 1, $translate = 1)
Method _css_urls_rewrite_and_save
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function _css_urls_rewrite_and_save($content, $content_url, $cache_path, $content_type = 'url', $orig_content = '')
Method time_box
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function time_box($selected = '', $name_postfix = '', $add_str = '', $show_text = 1, $translate = 1)
Method time_box
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function time_box($selected = '', $name_postfix = '', $add_str = '', $show_text = 1, $translate = 1)