Showing 646 of 1,188 total issues
Function createTableRow
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function createTableRow($object, $level = 0)
{
$aObject = [];
$i = 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
prototype
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
Test.Unit.Assertions.prototype = {
initialize: function () {
this.assertions = 0;
this.failures = 0;
this.errors = 0;
Method createElements
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createElements()
{
$controls = $this->targetObject->controls;
$vars = $this->targetObject->vars;
foreach ($vars as $key => $var) {
PersistableObjectHandler
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class PersistableObjectHandler extends \XoopsObjectHandler
{
public $_itemname;
/**
Function addto
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addto(addsite, AddURL, AddTitle) {
var AddURL = AddURL;
var AddTitle = AddTitle;
switch (addsite) {
case 0: // AddToBookmarks.com ID:0 - an educational page on what Social Bookmarking is
Method generateSeoTitle
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateSeoTitle($title = '', $withExt = true)
{
// Transformation de la chaine en minuscule
// Codage de la chaine afin d'éviter les erreurs 500 en cas de caractères imprévus
$title = rawurlencode(strtolower($title));
Prototype
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Prototype extends JavaScript
{
public $CALLBACKS = [
'uninitialized',
'loading',
Prototype
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Prototype extends JavaScript
{
public $CALLBACKS = [
'uninitialized',
'loading',
Method addAndActivateUser
has 90 lines of code (exceeds 25 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);
Method generateTag
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateTag()
{
$title = rawurlencode(strtolower($this->getVar('description', 'e')));
$title = xoops_substr($title, 0, 10, '');
// Transformation des ponctuations
Method generateTag
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateTag()
{
$title = rawurlencode(strtolower($this->getVar('description', 'e')));
$title = xoops_substr($title, 0, 10, '');
// Transformation des ponctuations
Function Grow
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Effect.Grow = function (element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransition: Effect.Transitions.sinoidal,
Function Grow
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Effect.Grow = function (element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransition: Effect.Transitions.sinoidal,
Function Grow
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Effect.Grow = function (element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransition: Effect.Transitions.sinoidal,
Function getStyle
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
getStyle: function (element, style) {
element = $(element);
if (['float', 'cssFloat'].include(style))
style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
style = style.camelize();
- 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 getStyle
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
getStyle: function (element, style) {
element = $(element);
if (['float', 'cssFloat'].include(style))
style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
style = style.camelize();
- 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 getControl
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function getControl($controlName, $key)
{
switch ($controlName) {
case 'check':
// require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.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
Method getTextArea
has 85 lines of code (exceeds 25 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
DbTable
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class DbTable
{
/**
* @var string $_name name of the table
*/
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'