mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

Avoid excessively long variable names like $keep_settings_on_save. Keep variable name length under 20.
Open

    public $keep_settings_on_save = false;
Severity: Minor
Found in class/pear/Image/Transform.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $_supported_image_types. Keep variable name length under 20.
Open

    public $_supported_image_types = [];
Severity: Minor
Found in class/pear/Image/Transform.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $_default_error_handler. Keep variable name length under 20.
Open

    public $_default_error_handler = '';
Severity: Minor
Found in class/pear/PEAR.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $_default_error_options. Keep variable name length under 20.
Open

    public $_default_error_options = null;
Severity: Minor
Found in class/pear/PEAR.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $_PEAR_destructor_object_list. Keep variable name length under 20.
Open

                global $_PEAR_destructor_object_list;
Severity: Minor
Found in class/pear/PEAR.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $_PEAR_destructor_object_list. Keep variable name length under 20.
Open

    global $_PEAR_destructor_object_list;
Severity: Minor
Found in class/pear/PEAR.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

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 ) );
Severity: Minor
Found in assets/js/galleria/plugins/flickr/galleria.flickr.js - About 1 hr to fix

    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) {
    Severity: Minor
    Found in class/pear/Image/Transform/Driver/GD.php - About 1 hr to fix

      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') {
      Severity: Minor
      Found in assets/js/galleria/plugins/picasa/galleria.picasa.js - About 1 hr to fix

        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 ] ) )
        Severity: Minor
        Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 1 hr to fix

          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>';
              //==================================
          Severity: Minor
          Found in blocks/extgallery_blocks.php - About 1 hr to fix

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                getPrev : function( base ) {
                    base = typeof base === 'number' ? base : this.getIndex();
                    return base === 0 ? this.getDataLength() - 1 : base - 1;
                },
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js and 2 other locations - About 1 hr to fix
            assets/js/galleria/galleria-1.1.js on lines 2830..2833
            assets/js/galleria/galleria-1.3.5.js on lines 5179..5182

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                getPrev : function( base ) {
                    base = typeof base == 'number' ? base : this.getIndex();
                    return base === 0 ? this.getDataLength() - 1 : base - 1;
                },
            Severity: Major
            Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 1 hr to fix
            assets/js/galleria/galleria-1.3.3.js on lines 5158..5161
            assets/js/galleria/galleria-1.3.5.js on lines 5179..5182

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                getPrev : function( base ) {
                    base = typeof base === 'number' ? base : this.getIndex();
                    return base === 0 ? this.getDataLength() - 1 : base - 1;
                },
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js and 2 other locations - About 1 hr to fix
            assets/js/galleria/galleria-1.1.js on lines 2830..2833
            assets/js/galleria/galleria-1.3.3.js on lines 5158..5161

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                getNext : function( base ) {
                    base = typeof base === 'number' ? base : this.getIndex();
                    return base === this.getDataLength() - 1 ? 0 : base + 1;
                },
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js and 2 other locations - About 1 hr to fix
            assets/js/galleria/galleria-1.1.js on lines 2817..2820
            assets/js/galleria/galleria-1.3.3.js on lines 5145..5148

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                getNext : function( base ) {
                    base = typeof base === 'number' ? base : this.getIndex();
                    return base === this.getDataLength() - 1 ? 0 : base + 1;
                },
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js and 2 other locations - About 1 hr to fix
            assets/js/galleria/galleria-1.1.js on lines 2817..2820
            assets/js/galleria/galleria-1.3.5.js on lines 5166..5169

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                getNext : function( base ) {
                    base = typeof base == 'number' ? base : this.getIndex();
                    return base == this.getDataLength() - 1 ? 0 : base + 1;
                },
            Severity: Major
            Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 1 hr to fix
            assets/js/galleria/galleria-1.3.3.js on lines 5145..5148
            assets/js/galleria/galleria-1.3.5.js on lines 5166..5169

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                            if ( !this.anim ) {
                                // save animation parameters
                                this.anim = { start: this.pos, time: +new Date(), distance: distance, factor: factor, destination: this.to };
                            }
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
            assets/js/galleria/galleria-1.3.3.js on lines 6749..6752

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if ( this.finger && index !== this._active ) {
                        this.finger.to = -( index*this.finger.width );
                        this.finger.index = index;
                    }
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 1 hr to fix
            assets/js/galleria/galleria-1.3.5.js on lines 4799..4802

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if ( this.finger && index !== this._active ) {
                        this.finger.to = -( index*this.finger.width );
                        this.finger.index = index;
                    }
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
            assets/js/galleria/galleria-1.3.3.js on lines 4761..4764

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language