Showing 188 of 2,792 total issues
Function fileChecks
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function fileChecks()
{
echo '<fieldset>';
echo '<legend style="color: #990000; font-weight: bold;">' . \_AM_XOOPSTUBE_FILECHECKS . '</legend>';
- 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 xtubeReturnSource
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function xtubeReturnSource($returnsource)
{
switch ($returnsource) {
case 0:
$returnsource = _AM_XOOPSTUBE_YOUTUBE;
- 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 getTotalItems
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function getTotalItems($sel_id = 0, $get_child = 0, $return_sql = 0)
{
global $mytree, $_check_array;
if ($sel_id > 0) {
- 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 getBannerFromBannerId
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function getBannerFromBannerId($banner_id)
{
###### Hack by www.stefanosilvestrini.com ######
$db = \XoopsDatabaseFactory::getDatabaseConnection();
$bresult = $db->query('SELECT COUNT(*) FROM ' . $db->prefix('banner') . ' WHERE bid=' . $banner_id);
- 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 createMetaKeywords
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createMetaKeywords($content)
{
$keywordscount = self::getModuleOption('metagen_maxwords');
$keywordsorder = self::getModuleOption('metagen_order');
Method isBlockCloned
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options = null)
{
xoops_loadLanguage('admin', 'system');
xoops_loadLanguage('admin/blocksadmin', 'system');
xoops_loadLanguage('admin/groups', 'system');
Method getRandomVideoForHorizontalBlock
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getRandomVideoForHorizontalBlock($options)
{
global $myts;
$moduleDirName = \basename(\dirname(__DIR__));
$block = [];
File modinfo.php
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: XoopsTube
*
File video.php
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: XoopsTube
*
Function updateCache
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function updateCache()
{
global $xoopsModule;
$folder = $xoopsModule->getVar('dirname');
$tpllist = [];
- 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 getRandomVideo
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getRandomVideo($options)
{
global $myts;
$utility = new Utility();
$moduleDirName = \basename(\dirname(__DIR__));
Method sendEmailFromTpl
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sendEmailFromTpl($tplName, $recipients, $subject, $variables)
{
global $xoopsConfig;
require_once XOOPS_ROOT_PATH . '/class/xoopsmailer.php';
if (!\is_array($recipients)) {
Method xtubeReturnSource
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xtubeReturnSource($returnsource)
{
switch ($returnsource) {
case 0:
$returnsource = _AM_XOOPSTUBE_YOUTUBE;
Method getBannerFromBannerId
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getBannerFromBannerId($banner_id)
{
###### Hack by www.stefanosilvestrini.com ######
$db = \XoopsDatabaseFactory::getDatabaseConnection();
$bresult = $db->query('SELECT COUNT(*) FROM ' . $db->prefix('banner') . ' WHERE bid=' . $banner_id);
Method getBannerFromClientId
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getBannerFromClientId($client_id)
{
###### Hack by www.stefanosilvestrini.com ######
$db = \XoopsDatabaseFactory::getDatabaseConnection();
$bresult = $db->query('SELECT COUNT(*) FROM ' . $db->prefix('banner') . ' WHERE cid=' . $client_id);
Function sendEmailFromTpl
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function sendEmailFromTpl($tplName, $recipients, $subject, $variables)
{
global $xoopsConfig;
require_once XOOPS_ROOT_PATH . '/class/xoopsmailer.php';
if (!\is_array($recipients)) {
- 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 edit
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function edit($lid = 0)
{
global $myts, $mytree, $xtubeImageArray;
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE lid=' . $lid;
- 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 getRandomVideo
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function getRandomVideo($options)
{
global $myts;
$utility = new Utility();
$moduleDirName = \basename(\dirname(__DIR__));
- 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 getRandomVideoForHorizontalBlock
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function getRandomVideoForHorizontalBlock($options)
{
global $myts;
$moduleDirName = \basename(\dirname(__DIR__));
$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
Function fetchMedia
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function fetchMedia($media_name, $index = null)
{
global $_FILES;
if (!isset($_FILES[$media_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"