TeaThemeOptions/TeaThemeOptions

View on GitHub

Showing 177 of 177 total issues

File SearchElastica.php has 601 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace crewstyle\OlympusZeus\Plugins\Search;

use Elastica\Client;
Severity: Major
Found in src/Plugins/Search/SearchElastica.php - About 1 day to fix

    Method wp_enqueue_media_olz has 231 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        static function wp_enqueue_media_olz($args = array())
        {
            //Admin panel
            if (!OLZ_ISADMIN) {
                return;
    Severity: Major
    Found in src/Core/Hook/HookBackend.php - About 1 day to fix

      Method getSocialNetworks has 212 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getSocialNetworks()
          {
              return array(
                  'twitter'       => array(
                      'url'           => OlympusZeus::translate('http://www.twitter.com/'),
      Severity: Major
      Found in src/Core/Field/Social.php - About 1 day to fix

        File HookBackend.php has 440 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace crewstyle\OlympusZeus\Core\Hook;
        
        use crewstyle\OlympusZeus\OlympusZeus;
        Severity: Minor
        Found in src/Core/Hook/HookBackend.php - About 6 hrs to fix

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

              var methods = {
                  init: function (options){
                      if (!this.length) {
                          return false;
                      }
          Severity: Major
          Found in src/Resources/assets/js/link/link.js and 1 other location - About 5 hrs to fix
          src/Resources/assets/js/maps/maps.js on lines 244..271

          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 150.

          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

              var methods = {
                  init: function (options){
                      if (!this.length) {
                          return false;
                      }
          Severity: Major
          Found in src/Resources/assets/js/maps/maps.js and 1 other location - About 5 hrs to fix
          src/Resources/assets/js/link/link.js on lines 136..163

          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 150.

          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

          Method analysis has 132 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function analysis($index, $posttypes, $terms)
              {
                  //Check integrity
                  if (empty($index)) {
                      return null;
          Severity: Major
          Found in src/Plugins/Search/SearchElastica.php - About 5 hrs to fix

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

                OlTooltip.prototype.trigger_close = function (e){
                    e.preventDefault();
                    var _ol = this,
                        _delay = _ol.options.delayOut;
            
            
            Severity: Major
            Found in src/Resources/assets/js/tooltip/tooltip.js and 1 other location - About 4 hrs to fix
            src/Resources/assets/js/tooltip/tooltip.js on lines 215..232

            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 128.

            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

                OlTooltip.prototype.trigger_open = function (e){
                    e.preventDefault();
                    var _ol = this,
                        _delay = _ol.options.delayIn;
            
            
            Severity: Major
            Found in src/Resources/assets/js/tooltip/tooltip.js and 1 other location - About 4 hrs to fix
            src/Resources/assets/js/tooltip/tooltip.js on lines 196..213

            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 128.

            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

            <?php
            
            namespace crewstyle\OlympusZeus\Core\Term;
            
            use crewstyle\OlympusZeus\OlympusZeus;
            Severity: Major
            Found in src/Core/Term/Term.php and 1 other location - About 4 hrs to fix
            src/Core/PostType/PostType.php on lines 1..78

            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 175.

            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

            <?php
            
            namespace crewstyle\OlympusZeus\Core\Posttype;
            
            use crewstyle\OlympusZeus\OlympusZeus;
            Severity: Major
            Found in src/Core/PostType/PostType.php and 1 other location - About 4 hrs to fix
            src/Core/Term/Term.php on lines 1..78

            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 175.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olModal = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/modal/modal.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olCheckit = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/checkit/checkit.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olSocial = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/social/social.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olMaps = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/maps/maps.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olCheckall = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/checkall/checkall.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olYoutube = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/youtube/youtube.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olColor = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/color/color.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olToggle = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/toggle/toggle.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/textarea/textarea.js on lines 78..89
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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 18 locations. Consider refactoring.
            Open

                $.fn.olTextarea = function (method){
                    if (methods[method]) {
                        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
                    }
                    else if (typeof method === 'object' || !method) {
            Severity: Major
            Found in src/Resources/assets/js/textarea/textarea.js and 17 other locations - About 4 hrs to fix
            src/Resources/assets/js/background/background.js on lines 123..134
            src/Resources/assets/js/checkall/checkall.js on lines 107..118
            src/Resources/assets/js/checkit/checkit.js on lines 88..99
            src/Resources/assets/js/code/code.js on lines 131..142
            src/Resources/assets/js/color/color.js on lines 109..120
            src/Resources/assets/js/date/date.js on lines 80..91
            src/Resources/assets/js/dragndrop/dragndrop.js on lines 102..113
            src/Resources/assets/js/link/link.js on lines 165..176
            src/Resources/assets/js/maps/maps.js on lines 273..284
            src/Resources/assets/js/modal/modal.js on lines 99..110
            src/Resources/assets/js/multiselect/multiselect.js on lines 140..151
            src/Resources/assets/js/range/range.js on lines 74..85
            src/Resources/assets/js/social/social.js on lines 234..245
            src/Resources/assets/js/toggle/toggle.js on lines 76..87
            src/Resources/assets/js/tooltip/tooltip.js on lines 277..288
            src/Resources/assets/js/upload/upload.js on lines 261..272
            src/Resources/assets/js/youtube/youtube.js on lines 192..203

            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 127.

            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