Showing 182 of 279 total issues
Function initGallery
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
e.magnificPopup.registerModule("gallery", {options: {enabled: !1, arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', preload: [0, 2], navigateByImgClick: !0, arrows: !0, tPrev: "Previous (Left arrow key)", tNext: "Next (Right arrow key)", tCounter: "%curr% of %total%"}, proto: {initGallery: function () {
var n = t.st.gallery, i = ".mfp-gallery", r = Boolean(e.fn.mfpFastClick);
return t.direction = !0, n && n.enabled ? (a += " mfp-gallery", x(f + i, function () {
n.navigateByImgClick && t.wrap.on("click" + i, ".mfp-img", function () {
return t.items.length > 1 ? (t.next(), !1) : void 0
Method updateTable
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateTable(DbupdaterTable $table)
{
$ret = true;
echo '<ul>';
Function getMaxPublishdate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getMaxPublishdate(\CriteriaElement $criteria = null)
{
$field = '';
$groupby = false;
if (null !== $criteria && $criteria instanceof \CriteriaElement) {
- 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 toolbar
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function toolbar()
{
$helper = Helper::getInstance();
$isSubmissionAllowed = 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 convertorderbyout
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function convertorderbyout($orderby)
{
if ('title ASC' === $orderby) {
$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 getFileStatus
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function getFileStatus($file_path, $original_file_path = null, $redirectFile = null)
{
global $pathIcon16;
if (empty($file_path)) {
- 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 updateTable
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function updateTable(DbupdaterTable $table)
{
$ret = true;
echo '<ul>';
- 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 convertOrderByTrans
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function convertOrderByTrans($orderby)
{
$orderbyTrans = '';
if ('title ASC' === $orderby) {
$orderbyTrans = \_MD_WFDOWNLOADS_TITLEATOZ;
- 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 loadSampleData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadSampleData()
{
global $xoopsConfig;
$moduleDirName = basename(dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
Method displayCategory
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function displayCategory(Wfdownloads\Category $categoryObj, $level = 0)
{
$helper = Helper::getInstance();
$description = $categoryObj->description();
Method toolbar
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function toolbar()
{
$helper = Helper::getInstance();
$isSubmissionAllowed = false;
Consider simplifying this complex logical expression. Open
if (r || 2 !== n.which && !n.ctrlKey && !n.metaKey) {
var a = void 0 !== o.disableOn ? o.disableOn : e.magnificPopup.defaults.disableOn;
if (a)if (e.isFunction(a)) {
if (!a.call(t))return!0
} else if (a > I.width())return!0;
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$path = 'uploads',
$value = null,
$selected = '',
$size = 1,
$emptyselect = 0,
Method createThumb
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function createThumb($imgName, $imgPath, $imgSavePath, $width = 100, $height = 100, $quality = 100, $update = false, $aspect = 1)
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$objHandler,
$criteria = null,
$field_name = null,
array $alphabet = [],
$arg_name = 'letter',
Method uploading
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$filename,
$uploadDirectory = 'uploads',
$allowedMimetypes = [],
$redirectURL = 'index.php',
$num = 0,
Function recurseCopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function recurseCopy($src, $dst)
{
$dir = \opendir($src);
// @mkdir($dst);
if (!@\mkdir($dst) && !\is_dir($dst)) {
- 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 rcopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rcopy($src, $dest)
{
// 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 rmove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rmove($src, $dest)
{
// 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
Method isBlockCloned
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options = null)