Showing 701 of 9,653 total issues
Function fetchPhoto
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function fetchPhoto($file)
{
$jupart = Request::getInt('jupart', 0, 'POST');
$jufinal = Request::getInt('jufinal', 1, 'POST');
$md5sums = $_POST['md5sum'][0] ?? 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 _start
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
_start = function() {
var obj = selectedArray[ selectedIndex ],
href,
type,
title,
Function open
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
open: function(data) {
if(!_body) {
_body = $(document.body);
}
File watermark-border.php
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ExtGallery Admin settings
* Manage admin pages
Function rotate
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function rotate($angle, $options = null)
{
if (null === $options) {
$autoresize = true;
$color_mask = [255, 255, 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
Function listBlocks
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function listBlocks()
{
global $xoopsModule, $pathIcon16;
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
$moduleDirName = \basename(\dirname(__DIR__));
- 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 PclTarMerge
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PclTarMerge($p_tarname, $p_tarname_add, $p_mode = '', $p_mode_add = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarMerge', "tar='$p_tarname', tar_add='$p_tarname_add', mode='$p_mode', mode_add='$p_mode_add'");
$v_result = 1;
Function scale
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
scale: function( options ) {
var self = this;
// extend some defaults
Function scale
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
scale: function( options ) {
var self = this;
// extend some defaults
Method extgalleryPhotoShow
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extgalleryPhotoShow($options)
{
global $xoopsConfig;
$photos = [];
File album.php
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ExtGallery Admin settings
* Manage admin pages
*
Function get_crop_dimensions
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private function get_crop_dimensions($image_width, $image_height)
{
if ('false' === $this->smart_crop) {
return ['width' => $this->container_width, 'height' => $this->container_height];
}
- 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 build_settings_rows
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- 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 PclTarHandleAppend
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleAppend($p_tarname, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleAppend', "tar=$p_tarname, list, mode=$p_mode");
$v_result = 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 mkDir
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public static function mkDir($args)
{
$opts = self::_parseArgs($args, 'pm:');
if (PEAR::isError($opts)) {
return self::raiseError($opts);
- 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 extgalleryAjax
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extgalleryAjax($options)
{
$photos = [];
/** @var Extgallery\PhotoHandler $photoHandler */
$photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
Function _enter
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
_enter: function( callback ) {
fullscreen.active = true;
if ( IFRAME ) {
Method xoops_module_update_extgallery
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_extgallery(\XoopsModule $module, $previousVersion = null)
{
global $xoopsDB;
$moduleDirName = \basename(\dirname(__DIR__));
Function _enter
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
_enter: function( callback ) {
fullscreen.active = true;
if ( IFRAME ) {
Method PclTarHandleDelete
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PclTarHandleDelete($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleDelete', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
$v_result = 1;
$v_nb = 0;