Showing 759 of 1,838 total issues
Method input_add
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function input_add($class, $name, $name2, $rel, $size, $textmore, $preset = null, $id = null)
Function smallworld_getImageSize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function smallworld_getImageSize($w, $h, $url)
{
$bn = basename($url);
$w = (int)$w;
$h = (int)$h;
- 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 rmove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rmove($src, $dest)
{
// 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 generate_response
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function generate_response($content, $print_response = true)
{
if ($print_response) {
$json = json_encode($content);
$redirect = isset($_REQUEST['redirect']) ? stripslashes($_REQUEST['redirect']) : null;
- 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 post
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function post()
{
$upload = isset($_FILES[$this->field_name]) ? $_FILES[$this->field_name] : [
'tmp_name' => null,
'name' => null,
- 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 post
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function post()
{
$upload = isset($_FILES[$this->field_name]) ? $_FILES[$this->field_name] : [
'tmp_name' => null,
'name' => null,
- 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 rcopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rcopy($src, $dest)
{
// 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 getFriends
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getFriends($id, $action)
{
$id = (int)$id;
$data = [];
if ($GLOBALS['xoopsUser'] && ($GLOBALS['xoopsUser'] instanceof \XoopsUser)) {
- 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 recurseCopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function recurseCopy($src, $dst)
{
$dir = opendir($src);
// @mkdir($dst);
if (!@mkdir($dst) && !is_dir($dst)) {
- 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 access
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
Function _addOneSite
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
_addOneSite: function(settings, list, display, icon, url, onclick, hint) {
Function f
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var f = function (a, b, d, e, f, g, h) {
Function e
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var e = function (a, b, d, e, f, g, h) {
Function d
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var d = function (a, b, d, e, f, g, h) {
Function g
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
var g = function (a, b, d, e, f, g, h) {
Method textarea
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function textarea($name, $id, $title, $rows, $cols, $class, $preset = null)
Method handle_file_upload
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$uploaded_file,
$name,
$size,
$type,
$error,
Avoid deeply nested control flow statements. Open
if (!isSubmit && (!opt.validate || validate(xoops_smallworldthis, size - 1, opt))) {
xoops_smallworldthis.submit();
}
Avoid deeply nested control flow statements. Open
if (onSubmit) {
xoops_smallworldthis.attr('onsubmit', onSubmit);
} else {
xoops_smallworldthis.removeAttr('onsubmit');
}
Function func
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
tmpl.func = function (s, p1, p2, p3, p4, p5) {