Showing 701 of 9,653 total issues
Function init
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function() {
if ( lightbox.initialized ) {
return;
}
Function complete
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
var complete = (function( data, next, active, queue, thumb ) {
return function() {
var win;
Function __construct
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(
$message = 'unknown error',
$code = null,
$mode = null,
$options = 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 init
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function() {
if ( lightbox.initialized ) {
return;
}
Function getAll
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function &getAll(CriteriaElement $criteria = null, $fields = null, $asObject = true, $id_as_key = true)
{
if ($fields && \is_array($fields)) {
if (!\in_array($this->handler->keyName, $fields)) {
$fields[] = $this->handler->keyName;
- 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 History
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.History = (function () {
var onloads = [],
init = false,
Method fetchPhoto
has 85 lines of code (exceeds 25 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;
Function show
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
show: function(index) {
lightbox.active = index = typeof index === 'number' ? index : self.getIndex() || 0;
if ( !lightbox.initialized ) {
Function success
has 83 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,
Function success
has 83 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,
Function show
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
show: function(index) {
lightbox.active = index = typeof index === 'number' ? index : self.getIndex() || 0;
if ( !lightbox.initialized ) {
Function resize
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.resize = function($img,mode,o){
var maxW = 0;
var maxH = 0;
if(mode == 'single'){
switch(o.size){
Function find
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public static function find($args)
{
if (!is_array($args)) {
$args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
}
- 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 PclTarHandleHeader
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleHeader($p_tar, $p_filename, $p_mode, &$p_header, $p_stored_filename)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleHeader', "tar=$p_tar, file='$p_filename', mode='$p_mode', stored_filename='$p_stored_filename'");
$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 PclTarHandleCreate
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleCreate($p_tarname, $p_list, $p_mode, $p_add_dir = '', $p_remove_dir = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleCreate', "tar=$p_tarname, list, mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
$v_result = 1;
$v_list_detail = [];
- 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 factory
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function &factory($driver = '')
{
if ('' == $driver) {
$extensions = [
'imagick' => 'Imagick3',
- 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 TrDisplay
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function TrDisplay()
{
global $g_pcl_trace_level;
global $g_pcl_trace_mode;
global $g_pcl_trace_filename;
- 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 PclTarHandleAppend
has 81 lines of code (exceeds 25 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;
File NetPBM.php
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
Function initZoom
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
initZoom: function() {
var zoomSt = mfp.st.zoom,
ns = '.zoom',
image;