Showing 573 of 5,122 total issues
Method listingDel
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function listingDel($lid, $photo): void
{
global $xoopsDB;
$helper = Helper::getInstance();
$lid = (int)$lid;
Method adsAddCat
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$title,
$cat_desc,
$cat_keywords,
$cid,
$img,
Method receivePicture
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$title,
$pathUpload,
$thumbwidth,
$thumbheight,
$pictwidth,
Method isBlockCloned
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups, bool $redirect = true)
Method updateBlock
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function updateBlock(int $bid, string $btitle, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups)
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each( function() {
Function off
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
off: function( types, selector, fn ) {
var handleObj, type;
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
Function parseHTML
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( typeof data !== "string" ) {
return [];
}
if ( typeof context === "boolean" ) {
Function range
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
range : function( c, data ) {
if ( tsfRegex.toTest.test( data.iFilter ) ) {
var result, tmp, range1, range2,
table = c.table,
index = data.index,
Function range
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
range : function( c, data ) {
if ( tsfRegex.toTest.test( data.iFilter ) ) {
var result, tmp, range1, range2,
table = c.table,
index = data.index,
Method convertOrderByIn
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function convertOrderByIn($orderby): string
{
switch (\trim($orderby)) {
case 'titleA':
$orderby = 'title ASC';
Function getCategoriesCount
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getCategoriesCount($pid = 0): int
{
if (-1 == $pid) {
return $this->getCount();
}
- 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 insert
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function insert(\XoopsObject $object, $force = false): bool
{
global $lid;
if (!$object instanceof Pictures) {
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 propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function updateNav
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Lightbox.prototype.updateNav = function() {
// Check to see if the browser supports touch events. If so, we take the conservative approach
// and assume that mouse hover events are not supported and always show prev/next navigation
// arrows in image sets.
var alwaysShowNav = false;
Function position
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
position: function() {
if ( !this[ 0 ] ) {
return;
}
Function updateNav
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Lightbox.prototype.updateNav = function() {
// Check to see if the browser supports touch events. If so, we take the conservative approach
// and assume that mouse hover events are not supported and always show prev/next navigation
// arrows in image sets.
var alwaysShowNav = false;
Function when
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
when: function( singleValue ) {
var
// count of uncompleted subordinates
remaining = arguments.length,
Function addClass
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( isFunction( value ) ) {
Function clone
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = isAttached( elem );