Showing 646 of 1,188 total issues
Methods
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
Element.Methods = {
visible: function (element) {
return $(element).style.display != 'none';
},
Function doStoreFromDefaultForm
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function doStoreFromDefaultForm(
&$smartObj,
$objectid,
$created_success_msg,
$modified_success_msg,
- 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
Table
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class Table
{
public $_id;
public $_objectHandler;
public $_columns;
Method insert
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insert(\XoopsObject $obj, $force = false, $checkObject = true, $debug = false)
{
if (false !== $checkObject) {
if (!is_object($obj)) {
return false;
Methods
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
Element.Methods = {
visible: function (element) {
return $(element).style.display != 'none';
},
Methods
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
Element.Methods = {
visible: function (element) {
return $(element).style.display != 'none';
},
Methods
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
Element.Methods = {
visible: function (element) {
return $(element).style.display != 'none';
},
Function setStyle
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
setStyle: function (element, style) {
element = $(element);
for (var name in style) {
var value = style[name];
if (name == 'opacity') {
- 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 setStyle
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
setStyle: function (element, style) {
element = $(element);
for (var name in style) {
var value = style[name];
if (name == 'opacity') {
- 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 addto
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addto(addsite) {
switch (addsite) {
case 0: // AddToBookmarks.com ID:0 - an educational page on what Social Bookmarking is
var AddSite = "http://www.addtobookmarks.com/socialbookmarking.htm?";
var AddUrlVar = "url";
Function createElements
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function createElements()
{
$controls = $this->targetObject->controls;
$vars = $this->targetObject->vars;
foreach ($vars as $key => $var) {
- 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 addAndActivateUser
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function addAndActivateUser($userObj, $groups = false, $notifyUser = true, &$password = false)
{
$email = $userObj->getVar('email');
if (!$userObj->getVar('email') || '' === $email) {
$userObj->setErrors(_CO_SOBJECT_USER_NEED_EMAIL);
- 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 cleanVars
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function cleanVars()
{
$ts = \MyTextSanitizer::getInstance();
$existing_errors = $this->getErrors();
$this->_errors = [];
File ObjectController.php
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php namespace XoopsModules\Smartobject;
/**
* Contains the basis classes for managing any objects derived from SmartObjects
*
Function setOptions
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
setOptions: function (options) {
this.options = Object.extend({
choices: 10,
partialSearch: true,
partialChars: 2,
- 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 setOptions
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
setOptions: function (options) {
this.options = Object.extend({
choices: 10,
partialSearch: true,
partialChars: 2,
- 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 __construct
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($object, $key)
{
$var = $object->vars[$key];
parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e'));
- 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 getTextArea
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function getTextArea($key)
{
$var = $this->targetObject->vars[$key];
// if no control has been created, let's create a default one
- 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 __construct
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($object, $key)
{
$var = $object->vars[$key];
$size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1);
- 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 setOptions
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
setOptions: function (options) {
this.options = Object.extend({
choices: 10,
partialSearch: true,
partialChars: 2,
- 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"