bitslip6/bitfire

View on GitHub

Showing 749 of 749 total issues

Method on_err has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function on_err($errno, $errstr, $err_file, $err_line, $context = null): bool {
Severity: Minor
Found in error_handler.php - About 35 mins to fix

    Method cuckoo_read_or_set has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function cuckoo_read_or_set(array $ctx, string $key, int $ttl, callable $fn, int $priority = CUCKOO_LOW)
    Severity: Minor
    Found in firewall/src/cuckoo.php - About 35 mins to fix

      Method file_recurse has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function file_recurse(string $dirname, string $include_regex_filter = NULL, string $exclude_regex_filter = NULL, $max_files = 20000, bool $recurse = true) : \Generator {
      Severity: Minor
      Found in recovery.php - About 35 mins to fix

        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function __construct(string $os, string $browser, string $ver, bool $whitelist, bool $bot)
        Severity: Minor
        Found in firewall/src/botfilter.php - About 35 mins to fix

          Method file_recurse has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function file_recurse(string $dirname, callable $fn, string $regex_filter = NULL, array $result = array(), $max_results = 20000) : array {
          Severity: Minor
          Found in firewall/src/util.php - About 35 mins to fix

            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function __construct(int $type, string $key, $value, int $block_time, MatchType $chain = null) {
            Severity: Minor
            Found in firewall/src/bitfire.php - About 35 mins to fix

              Method file_recurse has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function file_recurse(string $dirname, callable $fn, string $regex_filter = NULL, array $result = array(), $max_results = 20000) : array {
              Severity: Minor
              Found in bin/bitfire-install.php - About 35 mins to fix

                Method new has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static function new(string $ip_str, int $valid, string $ua_str, int $exp_time, $answer)
                Severity: Minor
                Found in firewall/src/botfilter.php - About 35 mins to fix

                  Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      protected function __construct(int $ip_int, int $valid, int $ua_crc, int $exp_time, $answer)
                  Severity: Minor
                  Found in firewall/src/botfilter.php - About 35 mins to fix

                    Method opcode_add_only_php has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function opcode_add_only_php(?string $carry, string $opcode, string $from, int $from_offset, int $from_len): string
                    Severity: Minor
                    Found in firewall/src/cms.php - About 35 mins to fix

                      Function l has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      return(0,w.structuredPatch)(void 0,void 0,b,a)}return a}function h(a){return a.newFileName&&a.newFileName!==a.oldFileName}function i(a,b,c){return b===c?b:(a.conflict=!0,{mine:b,theirs:c})}function j(a,b){return a.oldStart<b.oldStart&&a.oldStart+a.oldLines<b.oldStart}function k(a,b){return{oldStart:a.oldStart,oldLines:a.oldLines,newStart:a.newStart+b,newLines:a.newLines,lines:a.lines}}function l(a,b,c,f,g){
                      Severity: Minor
                      Found in firewall/views/diff.min.js - About 35 mins to fix

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

                          return str
                            .replace(/&/g, '&amp;')
                            .replace(/'/g, "&apos;")
                            .replace(/"/g, '&quot;')
                            .replace(/>/g, '&gt;')   
                        Severity: Minor
                        Found in public/internal.js and 1 other location - About 35 mins to fix
                        public/internal.js on lines 112..117

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

                        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 d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return j.diff(a,b,c)}function f(a,b,c){var d=/*istanbul ignore start*/(0,i.generateOptions)(c,{ignoreWhitespace:!0});return j.diff(a,b,d)}b.__esModule=!0,b.lineDiff=void 0,b.diffLines=e,/*istanbul ignore start*/
                        b.diffTrimmedLines=f;var/*istanbul ignore start*/g=c(1),h=d(g),/*istanbul ignore start*/i=c(4),j=/*istanbul ignore start*/b.lineDiff=new/*istanbul ignore start*/h["default"];j.tokenize=function(a){var b=[],c=a.split(/(\n|\r\n)/);
                        Severity: Minor
                        Found in firewall/views/diff.min.js and 1 other location - About 35 mins to fix
                        firewall/views/diff.min.js on lines 185..186

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

                        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

                          return str
                            .replace(/&/g, '&amp;')
                            .replace(/'/g, "&#38;")
                            .replace(/"/g, '&#34;')
                            .replace(/>/g, '&gt;')
                        Severity: Minor
                        Found in public/internal.js and 1 other location - About 35 mins to fix
                        public/internal.js on lines 52..57

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

                        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

                        return c=(0,i.generateOptions)(c,{ignoreWhitespace:!0}),l.diff(a,b,c)}function f(a,b,c){return l.diff(a,b,c)}b.__esModule=!0,b.wordDiff=void 0,b.diffWords=e,/*istanbul ignore start*/
                        b.diffWordsWithSpace=f;var/*istanbul ignore start*/g=c(1),h=d(g),/*istanbul ignore start*/i=c(4),j=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,k=/\S/,l=/*istanbul ignore start*/b.wordDiff=new/*istanbul ignore start*/h["default"];l.equals=function(a,b){return this.options.ignoreCase&&(a=a.toLowerCase(),b=b.toLowerCase()),a===b||this.options.ignoreWhitespace&&!k.test(a)&&!k.test(b)},l.tokenize=function(a){
                        Severity: Minor
                        Found in firewall/views/diff.min.js and 1 other location - About 35 mins to fix
                        firewall/views/diff.min.js on lines 198..199

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

                        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 (length !== b.length) return false;
                        Severity: Major
                        Found in public/underscore.js - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

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

                            Avoid too many return statements within this method.
                            Open

                                        return str_replace($item, "", $carry);
                            Severity: Major
                            Found in firewall/src/dashboard.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

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

                                Avoid too many return statements within this method.
                                Open

                                                return (bool)$this->_x;
                                Severity: Major
                                Found in firewall/src/util.php - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language