krafthaus/bauhaus

View on GitHub

Showing 1,049 of 1,049 total issues

Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
    var matched, match, tokens, type,
        soFar, groups, preFilters,
        cached = tokenCache[ selector + " " ];

Severity: Minor
Found in bower_components/jquery/src/sizzle/dist/sizzle.js - About 1 hr to fix

    Function replace has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            self.replace = function(text, forward, all) {
                var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndex, hasMore;
    
                forward = forward !== false;
    
    
    Severity: Minor
    Found in bower_components/tinymce/plugins/searchreplace/plugin.js - About 1 hr to fix

      Method build has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function build()
          {
              $formMapper = $this->getMapper();
              $model      = $this->getModel();
              $primaryKey = (new $model)->getKeyName();
      Severity: Minor
      Found in src/KraftHaus/Bauhaus/Builder/FormBuilder.php - About 1 hr to fix

        Function slide has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          , slide: function (type, next) {
              var $active = this.$element.find('.item.active')
                , $next = next || $active[type]()
                , isCycling = this.interval
                , direction = type == 'next' ? 'left' : 'right'
        Severity: Minor
        Found in bower_components/bootstrap/docs/assets/js/bootstrap.js - About 1 hr to fix

          Function applyInlineFormat has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function applyInlineFormat(space) {
                  var selection, dom, rng, container, offset, startOffset, text, patternRng, pattern, delta, format;
          
                  function splitContainer() {
                      // Split text node and remove start/end from text node
          Severity: Minor
          Found in bower_components/tinymce/plugins/textpattern/plugin.js - About 1 hr to fix

            Function slide has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              , slide: function (type, next) {
                  var $active = this.$element.find('.item.active')
                    , $next = next || $active[type]()
                    , isCycling = this.interval
                    , direction = type == 'next' ? 'left' : 'right'
            Severity: Minor
            Found in bower_components/bootstrap/js/bootstrap-carousel.js - About 1 hr to fix

              Function slide has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                , slide: function (type, next) {
                    var $active = this.$element.find('.item.active')
                      , $next = next || $active[type]()
                      , isCycling = this.interval
                      , direction = type == 'next' ? 'left' : 'right'
              Severity: Minor
              Found in bower_components/bootstrap/docs/assets/js/bootstrap-carousel.js - About 1 hr to fix

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

                                    if (typeof picker.minViewMode === 'string') {
                                        switch (picker.minViewMode) {
                                            case 'months':
                                                picker.minViewMode = 1;
                                                break;
                bower_components/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 168..180

                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

                                    if (typeof picker.viewMode === 'string') {
                                        switch (picker.viewMode) {
                                            case 'months':
                                                picker.viewMode = 1;
                                                break;
                bower_components/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js on lines 154..166

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

                function matcherFromTokens( tokens ) {
                    var checkContext, matcher, j,
                        len = tokens.length,
                        leadingRelative = Expr.relative[ tokens[0].type ],
                        implicitRelative = leadingRelative || Expr.relative[" "],
                Severity: Minor
                Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

                  Function matcherFromTokens has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function matcherFromTokens( tokens ) {
                      var checkContext, matcher, j,
                          len = tokens.length,
                          leadingRelative = Expr.relative[ tokens[0].type ],
                          implicitRelative = leadingRelative || Expr.relative[" "],
                  Severity: Minor
                  Found in bower_components/jquery/src/sizzle/dist/sizzle.js - About 1 hr to fix

                    Function pasteRows has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function pasteRows(rows, before) {
                                var selectedRows = getSelectedRows(),
                                    targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
                                    targetCellCount = targetRow.cells.length;
                    
                    
                    Severity: Minor
                    Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                      try {
                          ajaxLocation = location.href;
                      } catch( e ) {
                          // Use the href attribute of an A element
                          // since IE will modify it given document.location
                      Severity: Major
                      Found in bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/src/ajax.js on lines 49..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 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 buildMenu has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private function buildMenu($menu)
                          {
                              $html = '';
                      
                              foreach ($menu as $value) {
                      Severity: Minor
                      Found in src/KraftHaus/Bauhaus/Menu/Builder.php - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

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

                      try {
                          ajaxLocation = location.href;
                      } catch( e ) {
                          // Use the href attribute of an A element
                          // since IE will modify it given document.location
                      Severity: Major
                      Found in bower_components/jquery/src/ajax.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/dist/jquery.js on lines 8582..8590

                      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

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

                      function restoreScript( elem ) {
                          var match = rscriptTypeMasked.exec( elem.type );
                          if ( match ) {
                              elem.type = match[1];
                          } else {
                      Severity: Major
                      Found in bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/src/manipulation.js on lines 115..123

                      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

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

                      function restoreScript( elem ) {
                          var match = rscriptTypeMasked.exec( elem.type );
                          if ( match ) {
                              elem.type = match[1];
                          } else {
                      Severity: Major
                      Found in bower_components/jquery/src/manipulation.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/dist/jquery.js on lines 5369..5377

                      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

                      function setPositiveNumber( elem, value, subtract ) {
                          var matches = rnumsplit.exec( value );
                          return matches ?
                              // Guard against undefined "subtract", e.g., when used as in cssHooks
                              Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
                      Severity: Major
                      Found in bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/src/css.js on lines 118..124

                      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

                      function setPositiveNumber( elem, value, subtract ) {
                          var matches = rnumsplit.exec( value );
                          return matches ?
                              // Guard against undefined "subtract", e.g., when used as in cssHooks
                              Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
                      Severity: Major
                      Found in bower_components/jquery/src/css.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/dist/jquery.js on lines 6506..6512

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

                          function htmlToData(html) {
                              var data = {};
                      
                              new tinymce.html.SaxParser({
                                  validate: false,
                      Severity: Minor
                      Found in bower_components/tinymce/plugins/media/plugin.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language