Eye4web/Eye4webZfcUserPm

View on GitHub

Showing 124 of 124 total issues

Function initContainer has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        initContainer: function () {

            var selector = ".select2-choices", selection;

            this.searchContainer = this.container.find(".select2-search-field");
Severity: Major
Found in data/public/select2-3.5.2/select2.js - About 5 hrs to fix

    Function prepareOpts has 140 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            prepareOpts: function (opts) {
                var element, select, idKey, ajaxUrl, self = this;
    
                element = opts.element;
    
    
    Severity: Major
    Found in data/public/select2-3.5.2/select2.js - About 5 hrs to fix

      Function updateResults has 109 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              updateResults: function (initial) {
                  var search = this.search,
                      results = this.results,
                      opts = this.opts,
                      data,
      Severity: Major
      Found in data/public/select2-3.5.2/select2.js - About 4 hrs to fix

        Function init has 107 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                init: function (opts) {
                    var results, search, resultsSelector = ".select2-results";
        
                    // prepare options
                    this.opts = opts = this.prepareOpts(opts);
        Severity: Major
        Found in data/public/select2-3.5.2/select2.js - About 4 hrs to fix

          Function positionDropdown has 92 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  positionDropdown: function() {
                      var $dropdown = this.dropdown,
                          container = this.container,
                          offset = container.offset(),
                          height = container.outerHeight(false),
          Severity: Major
          Found in data/public/select2-3.5.2/select2.js - About 3 hrs to fix

            File PmMapper.php has 311 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /*
             * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
             * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
             * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
            Severity: Minor
            Found in src/Eye4web/ZfcUser/Pm/Mapper/DoctrineORM/PmMapper.php - About 3 hrs to fix

              File PmService.php has 304 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /*
               * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
               * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
               * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
              Severity: Minor
              Found in src/Eye4web/ZfcUser/Pm/Service/PmService.php - About 3 hrs to fix

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

                        destroy: function() {
                            $("label[for='" + this.search.attr('id') + "']")
                                .attr('for', this.opts.element.attr("id"));
                            this.parent.destroy.apply(this, arguments);
                
                
                Severity: Major
                Found in data/public/select2-3.5.2/select2.js and 1 other location - About 3 hrs to fix
                data/public/select2-3.5.2/select2.js on lines 2072..2081

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

                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

                        destroy: function() {
                            $("label[for='" + this.focusser.attr('id') + "']")
                                .attr('for', this.opts.element.attr("id"));
                            this.parent.destroy.apply(this, arguments);
                
                
                Severity: Major
                Found in data/public/select2-3.5.2/select2.js and 1 other location - About 3 hrs to fix
                data/public/select2-3.5.2/select2.js on lines 2676..2685

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

                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

                            this.search.on("focus", this.bind(function(){
                                if (!this.container.hasClass("select2-container-active")) {
                                    this.opts.element.trigger($.Event("select2-focus"));
                                }
                                this.container.addClass("select2-container-active");
                Severity: Major
                Found in data/public/select2-3.5.2/select2.js and 1 other location - About 2 hrs to fix
                data/public/select2-3.5.2/select2.js on lines 2257..2262

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

                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

                            this.focusser.on("focus", this.bind(function(){
                                if (!this.container.hasClass("select2-container-active")) {
                                    this.opts.element.trigger($.Event("select2-focus"));
                                }
                                this.container.addClass("select2-container-active");
                Severity: Major
                Found in data/public/select2-3.5.2/select2.js and 1 other location - About 2 hrs to fix
                data/public/select2-3.5.2/select2.js on lines 2268..2273

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

                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

                    function character (n) {
                        return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova");
                    }
                Severity: Major
                Found in data/public/select2-3.5.2/select2_locale_hr.js and 1 other location - About 2 hrs to fix
                data/public/select2-3.5.2/select2_locale_ru.js on lines 20..22

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

                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

                    function character (n) {
                        return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов");
                    }
                Severity: Major
                Found in data/public/select2-3.5.2/select2_locale_ru.js and 1 other location - About 2 hrs to fix
                data/public/select2-3.5.2/select2_locale_hr.js on lines 21..23

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

                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

                        formatInputTooShort: function (input, min) {
                            var n = min - input.length;
                            if (n == 1) {
                                return "Prosím zadejte ještě jeden znak";
                            } else if (n <= 4) {
                Severity: Major
                Found in data/public/select2-3.5.2/select2_locale_cs.js and 1 other location - About 2 hrs to fix
                data/public/select2-3.5.2/select2_locale_sk.js on lines 16..25

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

                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

                        formatInputTooShort: function (input, min) {
                            var n = min - input.length;
                            if (n == 1) {
                                return "Prosím, zadajte ešte jeden znak";
                            } else if (n <= 4) {
                Severity: Major
                Found in data/public/select2-3.5.2/select2_locale_sk.js and 1 other location - About 2 hrs to fix
                data/public/select2-3.5.2/select2_locale_cs.js on lines 17..26

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

                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

                PmService has 21 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class PmService implements PmServiceInterface, EventManagerAwareInterface
                {
                    use EventManagerAwareTrait;
                
                    /**
                Severity: Minor
                Found in src/Eye4web/ZfcUser/Pm/Service/PmService.php - About 2 hrs to fix

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

                                  if (this.container) {
                                      syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
                                      this.container.addClass(evaluate(this.opts.containerCssClass, this.opts.element));
                                  }
                  Severity: Major
                  Found in data/public/select2-3.5.2/select2.js and 1 other location - About 2 hrs to fix
                  data/public/select2-3.5.2/select2.js on lines 1126..1129

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

                  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.dropdown) {
                                      syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
                                      this.dropdown.addClass(evaluate(this.opts.dropdownCssClass, this.opts.element));
                                  }
                  Severity: Major
                  Found in data/public/select2-3.5.2/select2.js and 1 other location - About 2 hrs to fix
                  data/public/select2-3.5.2/select2.js on lines 1121..1124

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

                  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

                  Function ajax has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function ajax(options) {
                          var timeout, // current scheduled but not yet executed request
                              handler = null,
                              quietMillis = options.quietMillis || 100,
                              ajaxUrl = options.url,
                  Severity: Minor
                  Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

                    Function local has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function local(options) {
                            var data = options, // data elements
                                dataText,
                                tmp,
                                text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
                    Severity: Minor
                    Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language