Showing 47 of 60 total issues
Function block_latestnews_show
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
function block_latestnews_show($options)
{
global $xoopsTpl, $xoopsUser, $xoopsConfig, $pathIcon16, $xoopsModule;
include_once XOOPS_ROOT_PATH . '/modules/latestnews/include/functions.php';
- 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 blocksadmin.php
has 522 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: XoopsTube
*
* You may not change or alter any portion of this comment or credits
Method block_latestnews_show
has 206 lines of code (exceeds 25 allowed). Consider refactoring. Open
function block_latestnews_show($options)
{
global $xoopsTpl, $xoopsUser, $xoopsConfig, $pathIcon16, $xoopsModule;
include_once XOOPS_ROOT_PATH . '/modules/latestnews/include/functions.php';
Function check
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function check( $post = true , $area = '' , $allow_repost = true )
{
global $xoopsModule ;
$this->_errors = array() ;
- 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 listBlocks
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listBlocks()
{
global $xoopsUser, $xoopsConfig, $xoopsModule, $pathIcon16;
include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
$db =& XoopsDatabaseFactory::getDatabaseConnection();
Function listBlocks
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
function listBlocks()
{
global $xoopsUser, $xoopsConfig, $xoopsModule, $pathIcon16;
include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
$db =& XoopsDatabaseFactory::getDatabaseConnection();
- 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 prepare2show
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function prepare2show($filescount)
{
include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
global $xoopsUser, $xoopsConfig, $xoopsModuleConfig;
$myts =& MyTextSanitizer::getInstance();
- 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 myblocksadmin_update_block
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
function myblocksadmin_update_block($bid, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $bmodule, $options=array())
{
global $xoopsConfig;
$myblock = new XoopsBlock($bid);
- 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 getAllPublished
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
static function getAllPublished($limit=0, $selected_stories=true, $start=0, $checkRight=false, $topic=0, $ihome=0, $asobject=true, $order = 'published', $topic_frontpage=false)
{
$db =& XoopsDatabaseFactory::getDatabaseConnection();
$myts =& MyTextSanitizer::getInstance();
- 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 blocksadmin.inc.php
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// $Id: blocksadmin.inc.php 12106 2013-09-29 10:23:10Z beckmi $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
Method prepare2show
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepare2show($filescount)
{
include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
global $xoopsUser, $xoopsConfig, $xoopsModuleConfig;
$myts =& MyTextSanitizer::getInstance();
Method b_latestnews_edit
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_latestnews_edit($options)
{
global $xoopsDB;
include_once XOOPS_ROOT_PATH . '/modules/latestnews/include/functions.php';
include_once XOOPS_ROOT_PATH . '/modules/news/class/class.newstopic.php';
File latestnews.php
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// ######################################################################
// # #
// # Latest News block by Mowaffak ( www.arabxoops.com ) #
// # based on Last Articles Block by Pete Glanz (www.glanz.ru) #
Function isBlockCloned
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
{
global $xoopsUser, $xoopsConfig;
if (file_exists(
XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/blocksadmin.php"
- 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 draw_repost_form
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function draw_repost_form( $area = '' )
{
// Notify which file is broken
if ( headers_sent() ) {
restore_error_handler() ;
- 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 isBlockCloned
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
{
global $xoopsUser, $xoopsConfig;
if (file_exists(
XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/blocksadmin.php"
Method myblocksadmin_update_block
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function myblocksadmin_update_block($bid, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $bmodule, $options=array())
{
global $xoopsConfig;
$myblock = new XoopsBlock($bid);
Function xtubeUpdateBlock
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function xtubeUpdateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $boptions, $groups)
{
$myblock = new XoopsBlock($bid);
$myblock->setVar('title', $btitle);
$myblock->setVar('weight', $bweight);
- 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 getAllPublished
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
static function getAllPublished($limit=0, $selected_stories=true, $start=0, $checkRight=false, $topic=0, $ihome=0, $asobject=true, $order = 'published', $topic_frontpage=false)
{
$db =& XoopsDatabaseFactory::getDatabaseConnection();
$myts =& MyTextSanitizer::getInstance();
Method cloneBlock
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cloneBlock($bid)
{
include_once dirname(__FILE__) . '/admin_header.php';
//include_once 'admin_header.php';
xoops_cp_header();