Showing 188 of 2,792 total issues
File Utility.php
has 2304 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace XoopsModules\Xoopstube;
/*
Method getSocialBookmarks
has 672 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getSocialBookmarks($lid)
{
global $xoopsModule;
// $myts = new Xoopstube\TextSanitizer();
Utility
has 95 functions (exceeds 20 allowed). Consider refactoring. Open
class Utility extends Common\SysUtility
{
//--------------- Custom module methods -----------------------------
public const MODULE_NAME = 'xoopstube';
File xoops_version.php
has 761 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: XoopsTube
*
File sbookmarks.php
has 677 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: XoopsTube
*
Method unhtml
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function unhtml($chaine)
{
$search = $replace = [];
$chaine = \html_entity_decode($chaine);
Method listBlocks
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listBlocks()
{
global $xoopsModule, $pathIcon16;
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
$moduleDirName = basename(dirname(__DIR__));
Function truncateHtml
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
{
if ($considerHtml) {
// if the plain text is shorter than the maximum length, return the whole text
if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
- 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 500 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
File admin.php
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: XoopsTube
*
Method edit
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
function edit($lid = 0)
{
global $myts, $mytree, $xtubeImageArray;
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE lid=' . $lid;
File main.php
has 474 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 renderAdminMenu
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function renderAdminMenu($header = '', $menu = '', $extra = '', $scount = 4)
{
global $xoopsModule;
$_named_vidid = \xoops_getenv('SCRIPT_NAME');
Function renderAdminMenu
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public static function renderAdminMenu($header = '', $menu = '', $extra = '', $scount = 4)
{
global $xoopsModule;
$_named_vidid = \xoops_getenv('SCRIPT_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"
Further reading
Function listBlocks
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function listBlocks()
{
global $xoopsModule, $pathIcon16;
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
$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
Method createCategory
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createCategory($cid = 0)
{
// require_once dirname(__DIR__) . '/class/xoopstube_lists.php';
// require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
Function displayIcons
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public static function displayIcons($time, $status = 0, $counter = 0)
{
global $xoopsModule;
$new = '';
- 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 category.php
has 380 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
File xoopstube_top.php
has 352 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 xtubeShowVideo
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xtubeShowVideo($vidid, $source, $screenshot, $picurl)
{
global $xoopsModule;
$showvideo = '';
$autoplay = $GLOBALS['xoopsModuleConfig']['autoplay'];