bitslip6/bitfire

View on GitHub

Showing 749 of 749 total issues

Avoid too many return statements within this method.
Open

        return Effect::new()->api(true, "malware listing", ["compressed" => false, "malware" => $malware, "file_path" => $request->post["file_path"]]);
Severity: Major
Found in firewall/src/api.php - About 30 mins to fix

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

    d.hunks.push(k(o,m)),e++,n+=o.newLines-o.oldLines;else if(j(p,o))
    // This patch does not overlap with any of the others, yay.
    d.hunks.push(k(p,n)),f++,m+=p.newLines-p.oldLines;else{
    // Overlap, merge as best we can
    var q={oldStart:Math.min(o.oldStart,p.oldStart),oldLines:0,newStart:Math.min(o.newStart+m,p.oldStart+n),newLines:0,lines:[]};l(q,o.oldStart,o.lines,p.oldStart,p.lines),f++,e++,d.hunks.push(q)}}return d}function g(a,b){if("string"==typeof a){if(/^@@/m.test(a)||/^Index:/m.test(a))/*istanbul ignore start*/
    Severity: Minor
    Found in firewall/views/diff.min.js and 1 other location - About 30 mins to fix
    firewall/views/diff.min.js on lines 304..310

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

    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

    Avoid too many return statements within this function.
    Open

          if (aStack[length] === a) return bStack[length] === b;
    Severity: Major
    Found in public/underscore.js - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return $carry . " <a style='float:left' href='$item' target='_blank'>$item</a><br>";
      Severity: Major
      Found in wordpress-plugin/bitfire-admin.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return UA_NO_MATCH;
        Severity: Major
        Found in firewall/src/botfilter.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                                  return unlink($this->key2name($key_name));
          Severity: Major
          Found in firewall/src/storage.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                return $effect->out($path . "config.ini")->hide_output();
            Severity: Major
            Found in firewall/src/util.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return Effect::new()->api(false, "invalid file: $path");
              Severity: Major
              Found in firewall/src/api.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return $carry;
                Severity: Major
                Found in firewall/src/dashboard.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                      return $effect;
                  Severity: Major
                  Found in firewall/src/cms.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                        return debugF("unable to write header key: [%s] [%d] bytes", $key, $size);
                    Severity: Major
                    Found in firewall/src/cuckoo.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              if ($ex_class === $bl_class) { return NULL; } 
                      Severity: Major
                      Found in firewall/src/bitfire_pure.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return ["content" => "", "length" => 0, "success" => false];
                        Severity: Major
                        Found in firewall/src/util.php - About 30 mins to fix

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

                          d.oldFileName=b.oldFileName||a.oldFileName,d.newFileName=b.newFileName||a.newFileName,d.oldHeader=b.oldHeader||a.oldHeader,d.newHeader=b.newHeader||a.newHeader)),d.hunks=[];for(var e=0,f=0,m=0,n=0;e<a.hunks.length||f<b.hunks.length;){var o=a.hunks[e]||{oldStart:1/0},p=b.hunks[f]||{oldStart:1/0};if(j(o,p))
                          // This patch does not overlap with any of the others, yay.
                          d.hunks.push(k(o,m)),e++,n+=o.newLines-o.oldLines;else if(j(p,o))
                          // This patch does not overlap with any of the others, yay.
                          d.hunks.push(k(p,n)),f++,m+=p.newLines-p.oldLines;else{
                          Severity: Minor
                          Found in firewall/views/diff.min.js and 1 other location - About 30 mins to fix
                          firewall/views/diff.min.js on lines 306..310

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

                          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

                          Avoid too many return statements within this method.
                          Open

                                  return $bot;
                          Severity: Major
                          Found in firewall/src/dashboard.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                    return $carry;
                            Severity: Major
                            Found in firewall/src/botfilter.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                  return $m;
                              Severity: Major
                              Found in firewall/src/cms.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                    return true;
                                Severity: Major
                                Found in firewall/src/bitfire_pure.php - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return false;
                                  Severity: Major
                                  Found in public/underscore.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                            if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
                                    Severity: Major
                                    Found in public/underscore.js - About 30 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language