Showing 701 of 9,653 total issues
Method _makeWatermark
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _makeWatermark($imageTransform)
{
if (!\function_exists('imagettfbbox')) {
return;
}
Function xoops_module_update_extgallery
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_extgallery(\XoopsModule $xoopsModule, $oldVersion = null)
{
$catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
$catHandler->rebuild();
- 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 extgalleryList
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function extgalleryList($options)
{
global $xoopsConfig;
/** @var Extgallery\PhotoHandler $photoHandler */
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
if (!PEAR::loadExtension('gd')) {
$this->isError(PEAR::raiseError('GD library is not available.', IMAGE_TRANSFORM_ERROR_UNSUPPORTED));
} else {
- 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 onload
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
onload = (function( self, callback, src ) {
return function() {
var complete = function() {
Function onThumbLoad
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
onThumbLoad = function( thumb, callback ) {
// scale when ready
thumb.scale({
width: thumb.data.width,
Function onThumbLoad
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
onThumbLoad = function( thumb, callback ) {
// scale when ready
thumb.scale({
width: thumb.data.width,
Function onload
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
onload = (function( self, callback, src ) {
return function() {
var complete = function() {
Function tipsy
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.tipsy = function(options) {
if (options === true) {
return this.data('tipsy');
} else if (typeof options == 'string') {
Method addLocalPhoto
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addLocalPhoto(
$catId,
$dirtyPhotoName,
$photoTitle = '',
$photoDesc = '',
Function appendHTML
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function appendHTML() {
if (!$box && document.body) {
init = false;
$window = $(window);
$box = $tag(div).attr({
Method get_easing_options
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function get_easing_options()
{
$options = [
'linear',
'swing',
Method checkVerModule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function checkVerModule($helper, $source = 'github', $default = 'master')
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
$update = '';
Function load
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.prototype.load = function() {
// pass if no data is provided or flickr option not found
if ( arguments.length || typeof this._options.flickr !== 'string' ) {
load.apply( this, Galleria.utils.array( arguments ) );
Method _generate
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _generate($filename, $type = '', $quality = null)
{
$type = mb_strtolower(('' == $type) ? $this->type : $type);
$options = is_array($quality) ? $quality : [];
switch ($type) {
Function _call
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
_call: function( type, url, params, callback ) {
url = 'https://picasaweb.google.com/data/feed/api/' + url + '?';
if (typeof params == 'function') {
Function complButton
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function complButton( btn, o )
{
var navi = ( btn != 'close' );
if ( navi && $.isNumeric( o[ btn ] ) )
Method extgalleryListEdit
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extgalleryListEdit($options)
{
$catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
$form = _MB_EXTGALLERY_PHOTO_NUMBER . ' : <input name="options[]" size="5" maxlength="255" value="' . $options[0] . '" type="text"><br>';
//==================================
Function ccmValidateBlockForm
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function ccmValidateBlockForm() {
if ($('#magnific_type').val() == 'select1') {
ccm_addError(ccm_t('selection-required'));
}
- 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 loadTableFromArrayWithReplace
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace)
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
- 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"