Showing 370 of 370 total issues

Method POST has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function POST(array $get, array $data) {
        $cfg = new DBConfig();

        foreach(self::$FIELDS as $field=>$type) {
            $val = Util::get($data, $field);
Severity: Minor
Found in phplib/REST/Admin.php - About 1 hr to fix

    Method constructQuery has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function constructQuery() {
            $query = Util::get($this->obj['query_data'], 'query');
            $fields = Util::get($this->obj['query_data'], 'fields', []);
            $parser = new \ESQuery\Parser;
            list($settings, $query_list) = $parser->parse($query);
    Severity: Minor
    Found in phplib/Search/Elasticsearch.php - About 1 hr to fix

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

      <?php
      
      namespace FOO;
      
      /**
      Severity: Major
      Found in phplib/REST/SearchLogs.php and 1 other location - About 1 hr to fix
      phplib/REST/AlertLogs.php on lines 1..31

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

      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 FOO;
      
      /**
      Severity: Major
      Found in phplib/REST/AlertLogs.php and 1 other location - About 1 hr to fix
      phplib/REST/SearchLogs.php on lines 1..31

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

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

              initialize: function(options) {
                  this.full = options.full;
                  this.keys = options.keys;
                  this.preview = options.preview;
              },
      Severity: Major
      Found in htdocs/assets/js/views/alerts/alertgroup.js and 3 other locations - About 1 hr to fix
      htdocs/assets/js/views/alerts/alert.js on lines 153..157
      htdocs/assets/js/views/alerts/alertgroup.js on lines 38..42
      htdocs/assets/js/views/alerts/alerts.js on lines 273..277

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

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

              initialize: function(options) {
                  this.key = options.key;
                  this.value = options.value;
                  this.renderers = options.renderers;
              },
      Severity: Major
      Found in htdocs/assets/js/views/alerts/alertgroup.js and 3 other locations - About 1 hr to fix
      htdocs/assets/js/views/alerts/alert.js on lines 153..157
      htdocs/assets/js/views/alerts/alertgroup.js on lines 124..128
      htdocs/assets/js/views/alerts/alerts.js on lines 273..277

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

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

              initialize: function(options) {
                  this.title = options.title;
                  this.query = options.query;
                  this.groups = options.groups;
              },
      Severity: Major
      Found in htdocs/assets/js/views/alerts/alerts.js and 3 other locations - About 1 hr to fix
      htdocs/assets/js/views/alerts/alert.js on lines 153..157
      htdocs/assets/js/views/alerts/alertgroup.js on lines 38..42
      htdocs/assets/js/views/alerts/alertgroup.js on lines 124..128

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

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

              initialize: function(options) {
                  this.key = options.key;
                  this.value = options.value;
                  this.temp = options.temp;
              },
      Severity: Major
      Found in htdocs/assets/js/views/alerts/alert.js and 3 other locations - About 1 hr to fix
      htdocs/assets/js/views/alerts/alertgroup.js on lines 38..42
      htdocs/assets/js/views/alerts/alertgroup.js on lines 124..128
      htdocs/assets/js/views/alerts/alerts.js on lines 273..277

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

      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

              updateByQuery: function(data, options) {
                  return Backbone.ajax(_.extend({
                      url: this.getUrl() + '/query',
                      data: data,
                  }, options));
      Severity: Major
      Found in htdocs/assets/js/collections/alert.js and 1 other location - About 1 hr to fix
      htdocs/assets/js/collections/alert.js on lines 33..38

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

      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

              cbRendered: function(cb) {
                  return $.proxy(function() {
                      if(this.rendered()) { cb.apply(this, arguments); }
                  }, this);
              },
      Severity: Major
      Found in htdocs/assets/js/view.js and 1 other location - About 1 hr to fix
      htdocs/assets/js/view.js on lines 409..413

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

      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

              cbLoaded: function(cb) {
                  return $.proxy(function() {
                      if(this.loaded()) { cb.apply(this, arguments); }
                  }, this);
              },
      Severity: Major
      Found in htdocs/assets/js/view.js and 1 other location - About 1 hr to fix
      htdocs/assets/js/view.js on lines 400..404

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

      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

              getIds: function(data, options) {
                  return Backbone.ajax(_.extend({
                      url: this.getUrl() + '/ids',
                      data: data,
                  }, options));
      Severity: Major
      Found in htdocs/assets/js/collections/alert.js and 1 other location - About 1 hr to fix
      htdocs/assets/js/collections/alert.js on lines 24..29

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

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

          Renderer.autoProcess = function(App, in_mapping, callback) {
              // Rank all renderers to determine whether they should run.
              var out_mapping = {};
      
              // First loop over each group of views.
      Severity: Minor
      Found in htdocs/assets/js/views/renderer.js - About 1 hr to fix

        Function parseKeyStr has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                parseKeyStr: function(keyStr) {
                    var tkeys = [];
                    var keys = keyStr.split('+');
                    for(var i = 0; i < keys.length; ++i) {
                        var tkey = keys[i];
        Severity: Minor
        Found in htdocs/assets/js/views/help.js - About 1 hr to fix

          Function beforeRoute has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  beforeRoute: function(route) {
                      if(this.View.Current) {
                          var val = this.View.Current.onExit();
                          // onExit returned false, deny.
                          var deny = _.isBoolean(val) && !val;
          Severity: Minor
          Found in htdocs/assets/js/app.js - About 1 hr to fix

            Function initSearchSelect has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var initSearchSelect = function(elems, searches, search, options) {
                    options = options || {};
            
                    var search_search = function(q) {
                        var term = q.term.toLowerCase();
            Severity: Minor
            Found in htdocs/assets/js/util.js - About 1 hr to fix

              Method read has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function read($data) {
                      if(!$this->allowRead()) {
                          throw new ForbiddenException;
                      }
              
              
              Severity: Minor
              Found in phplib/REST/Models.php - About 1 hr to fix

                Method test has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function test($get, $data) {
                        if(!$this->allowCreate()) {
                            throw new ForbiddenException;
                        }
                
                
                Severity: Minor
                Found in phplib/REST/Searches.php - About 1 hr to fix

                  Method GET has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function GET(array $get) {
                          $jira_data = [
                              'Issues' => [],
                              'Users' => [],
                          ];
                  Severity: Minor
                  Found in phplib/REST/Data/Jira.php - About 1 hr to fix

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

                                    cdata = {
                                        labels: chartdata[0],
                                        datasets: [_.extend({lineTension:0, data: chartdata[1], label: 'Created'}, ChartView.colors[0])]
                                    };
                    Severity: Major
                    Found in htdocs/assets/js/views/index.js and 1 other location - About 1 hr to fix
                    htdocs/assets/js/views/searches/search.js on lines 147..150

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

                    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