Showing 646 of 1,188 total issues
Function create
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
create: function (element) {
element = $(element);
var options = Object.extend({
element: element,
tag: 'li', // assumes li children, override with tag: 'tagname'
Function create
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
create: function (element) {
element = $(element);
var options = Object.extend({
element: element,
tag: 'li', // assumes li children, override with tag: 'tagname'
Function initialize
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
initialize: function (testcases) {
this.options = Object.extend({
testLog: 'testlog'
}, arguments[1] || {});
this.options.resultsURL = this.parseResultsURLQueryParameter();
- 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 img.php
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Image Creation script
*
* D.J.
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
File dtree.js
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*--------------------------------------------------|
| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
|---------------------------------------------------|
Method getControl
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getControl($controlName, $key)
{
switch ($controlName) {
case 'check':
// require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.php';
Function getLinkedUnameFromId
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static function getLinkedUnameFromId($userid = 0, $name = 0, $users = [], $withContact = false)
{
if (!is_numeric($userid)) {
return $userid;
}
- 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 createTableRows
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createTableRows()
{
$this->_aObjects = [];
$doWeHaveActions = false;
Function addNode
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
dTree.prototype.addNode = function (pNode) {
var str = '';
var n = 0;
- 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 renderValidationJS
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function renderValidationJS($withtags = true)
{
$js = '';
if ($withtags) {
$js .= "\n<!-- Start Form Validation JavaScript //-->\n<script type='text/javascript'>\n<!--//\n";
- 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 update.php
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
*
* Module: SmartSection
Method initCommonVar
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initCommonVar($varname, $displayOnForm = true, $default = 'notdefined')
{
switch ($varname) {
case 'dohtml':
$value = 'notdefined' !== $default ? $default : true;
Method renderValidationJS
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function renderValidationJS($withtags = true)
{
$js = '';
if ($withtags) {
$js .= "\n<!-- Start Form Validation JavaScript //-->\n<script type='text/javascript'>\n<!--//\n";
Method createTableRow
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createTableRow($object, $level = 0)
{
$aObject = [];
$i = 0;
Function getPlayerVersion
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
deconcept.SWFObjectUtil.getPlayerVersion = function () {
var _23 = new deconcept.PlayerVersion([0, 0, 0]);
if (navigator.plugins && navigator.mimeTypes.length) {
var x = navigator.plugins["Shockwave Flash"];
if (x && x.description) {
- 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 postDataToObject
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function postDataToObject(&$smartObj)
{
foreach (array_keys($smartObj->vars) as $key) {
switch ($smartObj->vars[$key]['data_type']) {
case XOBJ_DTYPE_IMAGE:
prototype
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Autocompleter.Base.prototype = {
baseInitialize: function (element, update, options) {
this.element = $(element);
this.update = $(update);
this.hasFocus = false;
prototype
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Autocompleter.Base.prototype = {
baseInitialize: function (element, update, options) {
this.element = $(element);
this.update = $(update);
this.hasFocus = false;
prototype
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Autocompleter.Base.prototype = {
baseInitialize: function (element, update, options) {
this.element = $(element);
this.update = $(update);
this.hasFocus = false;