Showing 701 of 9,653 total issues
Function PclTarHandleAddFile
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleAddFile($p_tar, $p_filename, $p_mode, &$p_header, $p_add_dir, $p_remove_dir)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddFile', "tar='$p_tar', filename='$p_filename', p_mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
$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 truncateHtml
has a Cognitive Complexity of 53 (exceeds 5 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) {
- 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 truncateHtml
has a Cognitive Complexity of 53 (exceeds 5 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
- 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 PclTarHandleUpdate
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PclTarHandleUpdate($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode, $p_add_dir, $p_remove_dir)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleUpdate', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
$v_result = 1;
$v_nb = 0;
File photo.php
has 495 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Xmf\Request;
/**
Function Finger
has 195 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.Finger = (function() {
var abs = M.abs;
// test for translate3d support
Function _show
has 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
_show : function() {
// shortcuts
var self = this,
queue = this._queue[ 0 ],
Function PclTarHandleExtractByIndex
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleExtractByIndex(
$p_tar,
&$p_index_current,
$p_index_start,
$p_index_stop,
- 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 Finger
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.Finger = (function() {
var abs = M.abs;
// test for translate3d support
File blocksadmin.php
has 476 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
Function _show
has 182 lines of code (exceeds 25 allowed). Consider refactoring. Open
_show : function() {
// shortcuts
var self = this,
queue = this._queue[ 0 ],
Method parse_span_elements
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function parse_span_elements($text, $markers = ['![', '&', '*', '<', '[', '_', '`', 'http', '~~'])
{
if (false === isset($text[2]) or $markers === []) {
return $text;
}
Function buildFilmstrip
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildFilmstrip() {
// Add wrapper to filmstrip to hide extra frames
j_filmstrip.wrap('<div class="strip_wrapper"></div>');
if(slide_method=='strip') {
j_frames.clone().appendTo(j_filmstrip);
Function PclTarHandleAddList
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleAddList($p_tar, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddList', "tar='$p_tar', list, mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
$v_result = 1;
$v_header = [];
- 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 _createThumbnails
has 177 lines of code (exceeds 25 allowed). Consider refactoring. Open
_createThumbnails : function( push ) {
this.get( 'total' ).innerHTML = this.getDataLength();
var src,
Function _createThumbnails
has 177 lines of code (exceeds 25 allowed). Consider refactoring. Open
_createThumbnails : function( push ) {
this.get( 'total' ).innerHTML = this.getDataLength();
var src,
Function _init
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
_init: function() {
var self = this;
if ( this._initialized ) {
Galleria.raise( 'Init failed: Gallery instance already initialized.' );
PhotoHandler
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
class PhotoHandler extends Extgallery\PersistableObjectHandler
{
public $photoUploader = null;
/**
Function objectToArray
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public function objectToArray($objects, $externalKeys = [], $format = 's')
{
static $cached;
$ret = [];
- 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 historyCheck
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
historyCheck: function(){
// if ((jQuery.browser.msie) && (jQuery.browser.version < 8)) {
if (jQuery.browser.msie) {
// On IE, check for location.hash of iframe
var ihistory = jQuery("#jQuery_history")[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"