Showing 188 of 2,792 total issues
Method convertOrderByIn
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function convertOrderByIn($orderby)
{
switch (\trim($orderby)) {
case 'titleA':
$orderby = 'title ASC';
Method convertOrderByTrans
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function convertOrderByTrans($orderby)
{
switch ($orderby) {
case 'hits ASC':
$orderByTrans = \_MD_XOOPSTUBE_POPULARITYLTOM;
Method cleanRequestVars
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function cleanRequestVars(
&$array,
$name = null,
$def = null,
$strict = false,
Method convertOrderByOut
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function convertOrderByOut($orderby)
{
switch ($orderby) {
case 'title ASC':
$orderby = 'titleA';
Method createThumbnail
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createThumbnail(
$img_width = null,
$img_height = null,
$img_quality = null,
$img_update = null,
Method xtubeSearch
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xtubeSearch($queryarray, $andor, $limit, $offset, $userid)
{
$sql = 'SELECT cid, pid FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_cat');
$result = $GLOBALS['xoopsDB']->query($sql);
while (false !== ($_search_group_check = $GLOBALS['xoopsDB']->fetchArray($result))) {
Method getFileStatus
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getFileStatus($file_path, $original_file_path = null, $redirectFile = null)
{
global $pathIcon16;
if (empty($file_path)) {
Method editTopVideoBlock
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editTopVideoBlock($options)
{
$form = '' . _MB_XOOPSTUBE_DISP . ' ';
$form .= "<input type='hidden' name='options[]' value='";
if ('published' === $options[0]) {
Function convertOrderByTrans
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function convertOrderByTrans($orderby)
{
switch ($orderby) {
case 'hits ASC':
$orderByTrans = \_MD_XOOPSTUBE_POPULARITYLTOM;
- 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 convertOrderByOut
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function convertOrderByOut($orderby)
{
switch ($orderby) {
case 'title ASC':
$orderby = 'titleA';
- 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 rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function rrmdir($src)
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
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
Function convertOrderByIn
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function convertOrderByIn($orderby)
{
switch (\trim($orderby)) {
case 'titleA':
$orderby = 'title ASC';
- 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 setMetas
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function setMetas($pageTitle = '', $metaDescription = '', $metaKeywords = '')
{
global $xoTheme, $xoTheme, $xoopsTpl;
$xoopsTpl->assign('xoops_pagetitle', $pageTitle);
if (isset($xoTheme) && \is_object($xoTheme)) {
- 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 upload
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function upload($chmod = 0644)
{
if ('' === $this->uploadDir) {
$this->setErrors(\_AM_XOOPSTUBE_NOUPLOADDIR);
Method loadTableFromArrayWithReplace
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace)
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
Method makeSeoUrl
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function makeSeoUrl($content, $urw = 1)
{
$s = "ÀÁÂÃÄÅÒÓÔÕÖØÈÉÊËÇÌÍÎÏÙÚÛÜÑàáâãäåòóôõöøèéêëçìíîïùúûüÿñ '()";
$r = 'AAAAAAOOOOOOEEEECIIIIUUUUYNaaaaaaooooooeeeeciiiiuuuuyn----';
$content = self::unhtml($content); // First, remove html entities
Method uploadFile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function uploadFile(
$indice,
$dstpath = XOOPS_UPLOAD_PATH,
$mimeTypes = null,
$uploadMaxSize = null,
Method uploadFiles
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function uploadFiles(
$FILES,
$uploaddir = 'uploads',
$allowed_mimetypes = '',
$redirecturl = 'index.php', // $num = 0,
Method getServerStats
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getServerStats()
{
//mb $wfdownloads = WfdownloadsWfdownloads::getInstance();
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
Method getLetters
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getLetters()
{
global $xoopsModule;
$letterchoice = '<div>' . \_MD_XOOPSTUBE_BROWSETOTOPIC . '</div>';