Showing 49 of 63 total issues
Function methods
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
var methods = (function () {
// private properties and methods go here
var c = {
bcClass: 'sf-breadcrumb',
menuClass: 'sf-js-enabled',
Function _mouseDrag
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseDrag: function (event) {
//Compute the helpers position
this.position = this._generatePosition(event);
this.positionAbs = this._convertPositionTo("absolute");
Method mymenus_block_show
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mymenus_block_show($options)
{
global $xoopsTpl, $xoopsLogger;
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\Helper::getInstance();
File nestedSortable.js
has 307 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery UI Nested Sortable
* v 1.3.5 / 21 jun 2012
* http://mjsarfatti.com/code/nestedSortable
*
Method editLink
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function editLink($id = null, $pid = null, $mid = null)
{
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\Helper::getInstance();
//
Function deleteDirectory
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static function deleteDirectory($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 mymenus_block_show
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function mymenus_block_show($options)
{
global $xoopsTpl, $xoopsLogger;
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\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 createUpdateTable
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static function createUpdateTable($table, $tablename, \XoopsObject $module)
{
if (!InfoTableExists($GLOBALS['xoopsDB']->prefix($module->getInfo('dirname')) . $tablename)) {
$sql = 'CREATE TABLE ' . $GLOBALS['xoopsDB']->prefix($module->getInfo('dirname')) . $tablename . ' (';
foreach ($table as $s => $w) {
- 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 mymenus_block_edit
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mymenus_block_edit($options)
{
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\Helper::getInstance();
//
Function getSkinInfo
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public static function getSkinInfo($moduleSkin = 'default', $useThemeSkin = false, $themeSkin = '')
{
// require __DIR__ . '/common.php';
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\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 hoverIntent
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.hoverIntent = function (handlerIn, handlerOut, selector) {
// default configuration values
var cfg = {
interval: 100,
Function mymenus_block_edit
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function mymenus_block_edit($options)
{
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\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
Method getModuleMenus
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function getModuleMenus($module, $pid)
{
global $xoopsModule;
static $id = -1;
/** @var \XoopsModules\Mymenus\Helper $helper */
Function editLink
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function editLink($id = null, $pid = null, $mid = null)
{
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\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
Method getConfig
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getConfig()
{
$moduleDirName = basename(dirname(__DIR__));
$moduleDirNameUpper = strtoupper($moduleDirName);
return (object)[
Method getSkinInfo
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getSkinInfo($moduleSkin = 'default', $useThemeSkin = false, $themeSkin = '')
{
// require __DIR__ . '/common.php';
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\Helper::getInstance();
Function toArray
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
toArray: function (options) {
var o = $.extend({}, this.options, options),
sDepth = o.startDepthCount || 0,
ret = [],
Function supersubs
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.supersubs = function (options) {
var opts = $.extend({}, $.fn.supersubs.defaults, options);
// return original object to support chaining
return this.each(function () {
// cache selections
Method addLink
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function addLink($mid)
{
/** @var \XoopsModules\Mymenus\Helper $helper */
$helper = \XoopsModules\Mymenus\Helper::getInstance();
//
Method createUpdateTable
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createUpdateTable($table, $tablename, \XoopsObject $module)
{
if (!InfoTableExists($GLOBALS['xoopsDB']->prefix($module->getInfo('dirname')) . $tablename)) {
$sql = 'CREATE TABLE ' . $GLOBALS['xoopsDB']->prefix($module->getInfo('dirname')) . $tablename . ' (';
foreach ($table as $s => $w) {