Showing 130 of 207 total issues
Function getForm
has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring. Open
public function getForm($donnee = [], $erreur = false, $action = false)
{
global $xoopsModule, $xoopsUser;
$helper = Helper::getInstance();
$utility = new \XoopsModules\Tdmdownloads\Utility();
- 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 xoops_version.php
has 803 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
/**
* TDMDownload
File downloads.php
has 684 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
use Xmf\Module\Admin;
Function getForm
has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring. Open
public function getForm($lid, $erreur, $donnee = [], $action = false)
{
global $xoopsDB, $xoopsModule, $xoopsUser;
$helper = Helper::getInstance();
$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
File Blocksadmin.php
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace XoopsModules\Tdmdownloads\Common;
Method getForm
has 236 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getForm($donnee = [], $erreur = false, $action = false)
{
global $xoopsModule, $xoopsUser;
$helper = Helper::getInstance();
$utility = new \XoopsModules\Tdmdownloads\Utility();
Method listBlocks
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function listBlocks(): void
{
global $xoopsModule, $pathIcon16;
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
// xoops_loadLanguage('admin', 'system');
Function truncateHtml
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public static function truncateHtml(
string $text,
?int $length = 100,
string $ending = '...',
bool $exact = 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
Method getForm
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getForm($lid, $erreur, $donnee = [], $action = false)
{
global $xoopsDB, $xoopsModule, $xoopsUser;
$helper = Helper::getInstance();
$moduleDirName = \basename(\dirname(__DIR__));
Function importWfdownloads
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
function importWfdownloads($shots = '', $catimg = '')
{
$moduleDirName = basename(dirname(__DIR__));
$ok = \Xmf\Request::getInt('ok', 0, 'POST');
global $xoopsDB;
- 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 importMydownloads
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function importMydownloads($path = '', $imgurl = '')
{
$moduleDirName = basename(dirname(__DIR__));
$ok = \Xmf\Request::getInt('ok', 0, 'POST');
global $xoopsDB;
- 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 update_tdmdownloads_v201
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
function update_tdmdownloads_v201($module)
{
$moduleDirName = \basename(\dirname(__DIR__));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
$helper = Helper::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 b_tdmdownloads_search_show
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function b_tdmdownloads_search_show()
{
require dirname(__DIR__) . '/include/common.php';
$moduleDirName = basename(dirname(__DIR__));
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.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 b_tdmdownloads_top_show
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function b_tdmdownloads_top_show($options)
{
require dirname(__DIR__) . '/include/common.php';
/** @var \XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
- 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 33 (exceeds 5 allowed). Consider refactoring. Open
public function listBlocks(): void
{
global $xoopsModule, $pathIcon16;
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
// xoops_loadLanguage('admin', 'system');
- 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 Utility.php
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace XoopsModules\Tdmdownloads;
Method importMydownloads
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
function importMydownloads($path = '', $imgurl = '')
{
$moduleDirName = basename(dirname(__DIR__));
$ok = \Xmf\Request::getInt('ok', 0, 'POST');
global $xoopsDB;
Method b_tdmdownloads_top_show
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_tdmdownloads_top_show($options)
{
require dirname(__DIR__) . '/include/common.php';
/** @var \XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
File category.php
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
use Xmf\Module\Admin;
Method b_tdmdownloads_search_show
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_tdmdownloads_search_show()
{
require dirname(__DIR__) . '/include/common.php';
$moduleDirName = basename(dirname(__DIR__));
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';