Eye4web/Eye4webZfcUserPm

View on GitHub

Showing 124 of 124 total issues

Method __construct has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct($name = 'create-conversation')
    {
        parent::__construct($name);

        $this->add(
Severity: Minor
Found in src/Eye4web/ZfcUser/Pm/Form/NewConversationForm.php - About 1 hr to fix

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

                if(this.search.val() === "") {
                    if(this.nextSearchTerm != undefined){
                        this.search.val(this.nextSearchTerm);
                        this.search.select();
                    }
    Severity: Major
    Found in data/public/select2-3.5.2/select2.js and 1 other location - About 1 hr to fix
    data/public/select2-3.5.2/select2.js on lines 2020..2025

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

    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

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

                if(this.search.val() === "") {
                    if(this.nextSearchTerm != undefined){
                        this.search.val(this.nextSearchTerm);
                        this.search.select();
                    }
    Severity: Major
    Found in data/public/select2-3.5.2/select2.js and 1 other location - About 1 hr to fix
    data/public/select2-3.5.2/select2.js on lines 2927..2932

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

    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 opening has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            opening: function() {
                var cid = this.containerEventName,
                    scroll = "scroll." + cid,
                    resize = "resize."+cid,
                    orient = "orientationchange."+cid,
    Severity: Minor
    Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

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

          function character (n) {
              return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į");
          }
      Severity: Major
      Found in data/public/select2-3.5.2/select2_locale_lt.js and 1 other location - About 1 hr to fix
      data/public/select2-3.5.2/select2_locale_lt.js on lines 14..16

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

      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

              formatSelectionTooBig: function (limit) {
                  return "Jūs galite pasirinkti tik " + limit + " element" + ((limit%100 > 9 && limit%100 < 21) || limit%10 == 0 ? "ų" : limit%10 > 1 ? "us" : "ą");
              },
      Severity: Major
      Found in data/public/select2-3.5.2/select2_locale_lt.js and 1 other location - About 1 hr to fix
      data/public/select2-3.5.2/select2_locale_lt.js on lines 23..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 71.

      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 select2 has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.fn.select2 = function () {
      
              var args = Array.prototype.slice.call(arguments, 0),
                  opts,
                  select2,
      Severity: Minor
      Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

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

                formatInputTooShort: function (input, min) { var n = min - input.length; return "Saisissez " + n + " caractère" + (n == 1? "" : "s") + " supplémentaire" + (n == 1? "" : "s") ; },
        Severity: Major
        Found in data/public/select2-3.5.2/select2_locale_fr.js and 1 other location - About 1 hr to fix
        data/public/select2-3.5.2/select2_locale_el.js on lines 11..11

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

        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; return "Παρακαλούμε εισάγετε " + n + " περισσότερο" + (n > 1 ? "υς" : "") + " χαρακτήρ" + (n > 1 ? "ες" : "α"); },
        Severity: Major
        Found in data/public/select2-3.5.2/select2_locale_el.js and 1 other location - About 1 hr to fix
        data/public/select2-3.5.2/select2_locale_fr.js on lines 10..10

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

        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 addSelectedChoice has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                addSelectedChoice: function (data) {
                    var enableChoice = !data.locked,
                        enabledItem = $(
                            "<li class='select2-search-choice'>" +
                            "    <div></div>" +
        Severity: Minor
        Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

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

                  prepareOpts: function () {
                      var opts = this.parent.prepareOpts.apply(this, arguments),
                          self=this;
          
                      // TODO validate placeholder is a string if specified
          Severity: Minor
          Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

            Function val has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    val: function () {
                        var val,
                            triggerChange = false,
                            data = null,
                            self = this,
            Severity: Minor
            Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

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

                              if (checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
                                  render("<li class='select2-no-results'>" + evaluate(opts.formatInputTooShort, opts.element, search.val(), opts.minimumInputLength) + "</li>");
                              } else {
                                  render("");
                              }
              Severity: Major
              Found in data/public/select2-3.5.2/select2.js and 1 other location - About 1 hr to fix
              data/public/select2-3.5.2/select2.js on lines 1748..1752

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

              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 (limit == 1) {
                              return "Môžete zvoliť len jednu položku";
                          } else if (limit >= 2 && limit <= 4) {
                              return "Môžete zvoliť najviac "+smallNumbers[limit](false)+" položky";
                          } else {
              Severity: Major
              Found in data/public/select2-3.5.2/select2_locale_sk.js and 1 other location - About 1 hr to fix
              data/public/select2-3.5.2/select2_locale_sk.js on lines 28..34

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

              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 (n == 1) {
                              return "Prosím, zadajte o jeden znak menej";
                          } else if (n >= 2 && n <= 4) {
                              return "Prosím, zadajte o "+smallNumbers[n](true)+" znaky menej";
                          } else {
              Severity: Major
              Found in data/public/select2-3.5.2/select2_locale_sk.js and 1 other location - About 1 hr to fix
              data/public/select2-3.5.2/select2_locale_sk.js on lines 37..43

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

              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 (checkFormatter(opts.formatInputTooLong, "formatInputTooLong")) {
                                  render("<li class='select2-no-results'>" + evaluate(opts.formatInputTooLong, opts.element, search.val(), opts.maximumInputLength) + "</li>");
                              } else {
                                  render("");
                              }
              Severity: Major
              Found in data/public/select2-3.5.2/select2.js and 1 other location - About 1 hr to fix
              data/public/select2-3.5.2/select2.js on lines 1738..1742

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

              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 getInputFilterSpecification has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getInputFilterSpecification()
                  {
                      return [
                          [
                              'name' => 'headline',
              Severity: Minor
              Found in src/Eye4web/ZfcUser/Pm/Form/NewConversationForm.php - About 1 hr to fix

                Function populateResults has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                populateResults: function(container, results, query) {
                                    var populate, id=this.opts.id, liveRegion=this.liveRegion;
                
                                    populate=function(results, container, depth) {
                
                
                Severity: Minor
                Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

                  Function callback has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                      callback: this.bind(function (data) {
                                  var def; // default choice
                  
                                  // ignore old responses
                                  if (queryNumber != this.queryCount) {
                  Severity: Minor
                  Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix

                    Function destroy has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            destroy: function () {
                                var element=this.opts.element, select2 = element.data("select2"), self = this;
                    
                                this.close();
                    
                    
                    Severity: Minor
                    Found in data/public/select2-3.5.2/select2.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language