Showing 701 of 9,653 total issues
Function rescale
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
rescale : function( width, height, complete ) {
var self = this;
// allow rescale(fn)
Function bind
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind: function( elem, value ) {
if (! tooltip.initialized ) {
tooltip.init();
}
Function _parseMarkup
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseMarkup: function(template, values, item) {
var arr;
if(item.data) {
values = $.extend(item.data, values);
}
Method convertResultSet
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function convertResultSet($result, $id_as_key = false, $as_object = true)
{
$trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 1);
\trigger_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated.' . ". Called from {$trace[0]['file']}line {$trace[0]['line']}", \E_USER_WARNING);
$ret = [];
Method convertorderbytrans
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function convertorderbytrans($SortbyOrderby)
{
$orderbyTrans = [];
if ('photo_date DESC' === $SortbyOrderby) {
$orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
Method convertorderbytrans
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function convertorderbytrans($SortbyOrderby)
{
$orderbyTrans = [];
if ('photo_date DESC' === $SortbyOrderby) {
$orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
Method rm
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function rm($args)
{
$opts = self::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
if (PEAR::isError($opts)) {
return self::raiseError($opts);
Method _mediumPhotoTreatment
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _mediumPhotoTreatment($photoName, $filePath = null, $mediumFilePath = null)
{
/** @var Extgallery\Helper $helper */
$helper = Extgallery\Helper::getInstance();
Function add
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
add: function(element, interval, label, fn, times) {
var counter = 0;
if (jQuery.isFunction(label)) {
if (!times)
- 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 extgallery_tag_iteminfo
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function extgallery_tag_iteminfo(&$items)
{
if (empty($items) || !is_array($items)) {
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 PclTarCreate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function PclTarCreate($p_tarname, $p_filelist = '', $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarCreate', "tar=$p_tarname, file='$p_filelist', 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 _postProcess
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function _postProcess($type, $quality)
{
array_unshift($this->command, $this->_prepare_cmd(IMAGE_TRANSFORM_NETPBM_PATH, mb_strtolower($this->type) . 'topnm', escapeshellarg($this->image)));
$arg = '';
$type = mb_strtolower($type);
- 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 __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
print "PEAR constructor called, class=$classname\n";
- 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 rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function rrmdir($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 _getSizes
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
_getSizes: function() {
var self = this,
norm = {
small: '72c',
Function add
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function(elem, to, from, hide) {
if (!elem) {
return;
}
if (!idle.bound) {
Function loop
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
loop: function() {
var distance = this.to - this.pos,
factor = 1;
Function rescale
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
rescale: function(event) {
// calculate
var width = Math.min( $(window).width(), lightbox.width ),
height = Math.min( $(window).height(), lightbox.height ),
Function add
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function(elem, to, from, hide) {
if ( !elem || Galleria.TOUCH ) {
return;
}
if (!idle.bound) {
Function loadTheme
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.loadTheme = function( src, options ) {
var loaded = false,
length = _galleries.length;