Showing 646 of 1,188 total issues
Function getVar
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
public function getVar($key, $format = 's')
{
global $myts;
$ret = $this->vars[$key]['value'];
- 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 unittest.js
has 556 lines of code (exceeds 250 allowed). Consider refactoring. Open
// script.aculo.us unittest.js v1.6.4, Wed Sep 06 11:30:58 CEST 2006
// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005 Jon Tirsen (http://www.tirsen.com)
// (c) 2005 Michael Schuerig (http://www.schuerig.de/michael/)
File Table.php
has 542 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php namespace XoopsModules\Smartobject;
/**
* Contains the classes responsible for displaying a simple table filled with records of SmartObjects
*
Function xoops_module_update_smartobject
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_smartobject(\XoopsModule $module)
{
ob_start();
$dbVersion = Smartobject\Utility::getMeta('version', 'smartobject');
- 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 getVar
has 221 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getVar($key, $format = 's')
{
global $myts;
$ret = $this->vars[$key]['value'];
Utility
has 58 functions (exceeds 20 allowed). Consider refactoring. Open
class Utility
{
use Common\VersionChecks; //checkVerXoops, checkVerPhp Traits
use Common\ServerStats; // getServerStats Trait
Function createTableRows
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function createTableRows()
{
$this->_aObjects = [];
$doWeHaveActions = 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 render
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function render($fetchOnly = false, $debug = false)
{
require_once XOOPS_ROOT_PATH . '/class/template.php';
$this->_tpl = new \XoopsTpl();
- 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
BaseSmartObject
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
class BaseSmartObject extends \XoopsObject
{
public $_image_path;
public $_image_url;
Method xoops_module_update_smartobject
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_smartobject(\XoopsModule $module)
{
ob_start();
$dbVersion = Smartobject\Utility::getMeta('version', 'smartobject');
Function upgradeObjectItem
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function upgradeObjectItem($module, $item)
{
$moduleHandler = xoops_getModuleHandler($item, $module);
if (!$moduleHandler) {
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 update_tables_to_300
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
function update_tables_to_300()
{
$dbupdater = new Wfdownloads\Dbupdater();
if (!wfdownloads_TableExists('wfdownloads_meta')) {
Method render
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($fetchOnly = false, $debug = false)
{
require_once XOOPS_ROOT_PATH . '/class/template.php';
$this->_tpl = new \XoopsTpl();
Function node
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
dTree.prototype.node = function (node, nodeId) {
var str = '<div class="dTreeNode">' + this.indent(node, nodeId);
if (this.config.useIcons) {
- 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 node
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
node: function (elementName) {
elementName = elementName.toUpperCase();
// try innerHTML approach
var parentTag = this.NODEMAP[elementName] || 'div';
- 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 indent
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
dTree.prototype.indent = function (node, nodeId) {
var str = '';
if (this.root.id != node.pid) {
- 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 node
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
node: function (elementName) {
elementName = elementName.toUpperCase();
// try innerHTML approach
var parentTag = this.NODEMAP[elementName] || 'div';
- 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 node
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
node: function (elementName) {
elementName = elementName.toUpperCase();
// try innerHTML approach
var parentTag = this.NODEMAP[elementName] || 'div';
- 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 postDataToObject
has a Cognitive Complexity of 39 (exceeds 5 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:
- 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
Methods
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
Element.Methods = {
visible: function (element) {
return $(element).style.display != 'none';
},