Showing 701 of 9,653 total issues
Function addPan
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
addPan : function( img ) {
if ( this._options.imageCrop === false ) {
return;
}
Method truncateHtml
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
{
if ($considerHtml) {
// if the plain text is shorter than the maximum length, return the whole text
if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
Method truncateHtml
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
{
$open_tags = [];
if ($considerHtml) {
// if the plain text is shorter than the maximum length, return the whole text
Method postPhotoTraitement
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function postPhotoTraitement($file, $checkMd5 = false)
{
// require_once XOOPS_ROOT_PATH.'/modules/extgallery/class/photoUploader.php';
$catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
CategoryHandler
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class CategoryHandler extends Extgallery\PersistableObjectHandler
{
//var $_nestedTree;
public $_photoHandler;
Function addPan
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
addPan : function( img ) {
if ( this._options.image_crop === false ) {
return;
}
Function success
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
success: function() {
// calculate some cropping
var newWidth = ( width - options.margin * 2 ) / self.original.width,
newHeight = ( height - options.margin * 2 ) / self.original.height,
cropMap = {
Function deleteDirectory
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function deleteDirectory($src)
{
// 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 _raiseError
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected static function _raiseError(
$object,
$message = null,
$code = null,
$mode = 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 _PEAR_call_destructors
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function _PEAR_call_destructors()
{
global $_PEAR_destructor_object_list;
if (is_array($_PEAR_destructor_object_list)
&& count($_PEAR_destructor_object_list)) {
- 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 PclTarHandleReadHeader
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleReadHeader($v_binary_data, &$v_header)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
$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 SetCharSet
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function SetCharSet($vCharSet)
{
// check for input type
if (\is_array($vCharSet)) {
$this->aCharSet = $vCharSet;
- 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 init
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function() {
// trigger the event
self.trigger( Galleria.LIGHTBOX_OPEN );
PhpCaptcha
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class PhpCaptcha
{
public $oImage;
public $aFonts;
public $iWidth;
Function loadCSS
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadCSS : function( href, id, callback ) {
var link,
length;
Function loadCSS
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadCSS : function( href, id, callback ) {
var link,
length;
Function refresh
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
refresh: function() {
var imageData = this.currentImage;
if (!imageData)
return this;
Method _get_image_details
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _get_image_details($image)
{
$data = @getimagesize($image);
// 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP,
// 7 = TIFF (intel byte order), 8 = TIFF (motorola byte order),
Function _process_title
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
_process_title = function() {
titleStr = currentOpts.title || '';
titleHeight = 0;
title
File pcltrace.lib.php
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace XoopsModules\Extgallery;
// --------------------------------------------------------------------------------