krafthaus/bauhaus

View on GitHub

Showing 1,049 of 1,049 total issues

Function onPanelClick has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function onPanelClick(e) {
        var buttonCtrl = this.parent(), value;

        function selectColor(value) {
            buttonCtrl.hidePanel();
Severity: Minor
Found in bower_components/tinymce/plugins/textcolor/plugin.js - About 1 hr to fix

    Function mapColors has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function mapColors() {
            var i, colors = [], colorMap;
    
            colorMap = editor.settings.textcolor_map || [
                "000000", "Black",
    Severity: Minor
    Found in bower_components/tinymce/plugins/textcolor/plugin.js - About 1 hr to fix

      Function resize has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function resize(e) {
              var deltaSize, doc, body, docElm, DOM = tinymce.DOM, resizeHeight, myHeight,
                  marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;
      
              doc = editor.getDoc();
      Severity: Minor
      Found in bower_components/tinymce/plugins/autoresize/plugin.js - About 1 hr to fix

        Function create has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            public function create($input)
            {
                $mapper = $this->getMapper();
                $admin  = $mapper->getAdmin();
        
        
        Severity: Minor
        Found in src/KraftHaus/Bauhaus/Builder/FormBuilder.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

        Function update has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            public function update($input)
            {
                $mapper = $this->getMapper();
                $admin  = $mapper->getAdmin();
        
        
        Severity: Minor
        Found in src/KraftHaus/Bauhaus/Builder/FormBuilder.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

        Function internalData has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
            if ( !jQuery.acceptData( elem ) ) {
                return;
            }
        
        
        Severity: Minor
        Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

          Function createMenu has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function createMenu(context) {
                      var menuButton, menu, menuItems, isUserDefined, removedMenuItems;
          
                      removedMenuItems = tinymce.makeMap((settings.removed_menuitems || '').split(/[ ,]/));
          
          
          Severity: Minor
          Found in public/javascripts/themes/modern/theme.js - About 1 hr to fix

            Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            select = Sizzle.select = function( selector, context, results, seed ) {
                var i, tokens, token, type, find,
                    compiled = typeof selector === "function" && selector,
                    match = !seed && tokenize( (selector = compiled.selector || selector) );
            
            
            Severity: Minor
            Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

              Function internalData has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
                  if ( !jQuery.acceptData( elem ) ) {
                      return;
                  }
              
              
              Severity: Minor
              Found in bower_components/jquery/src/data.js - About 1 hr to fix

                Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                select = Sizzle.select = function( selector, context, results, seed ) {
                    var i, tokens, token, type, find,
                        compiled = typeof selector === "function" && selector,
                        match = !seed && tokenize( (selector = compiled.selector || selector) );
                
                
                Severity: Minor
                Found in bower_components/jquery/src/sizzle/dist/sizzle.js - About 1 hr to fix

                  Function applyBlockFormat has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function applyBlockFormat() {
                          var selection, dom, container, firstTextNode, node, format, textBlockElm, pattern, walker, rng, offset;
                  
                          selection = editor.selection;
                          dom = editor.dom;
                  Severity: Minor
                  Found in bower_components/tinymce/plugins/textpattern/plugin.js - About 1 hr to fix

                    Function createMenu has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function createMenu(context) {
                                var menuButton, menu, menuItems, isUserDefined, removedMenuItems;
                    
                                removedMenuItems = tinymce.makeMap((settings.removed_menuitems || '').split(/[ ,]/));
                    
                    
                    Severity: Minor
                    Found in bower_components/tinymce/themes/modern/theme.js - About 1 hr to fix

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

                      <?php
                      
                      namespace KraftHaus\Bauhaus\Field;
                      
                      /**
                      Severity: Major
                      Found in src/KraftHaus/Bauhaus/Field/DateField.php and 2 other locations - About 1 hr to fix
                      src/KraftHaus/Bauhaus/Field/DatetimeField.php on lines 1..47
                      src/KraftHaus/Bauhaus/Field/TimeField.php on lines 1..48

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

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

                      <?php
                      
                      namespace KraftHaus\Bauhaus\Field;
                      
                      /**
                      Severity: Major
                      Found in src/KraftHaus/Bauhaus/Field/TimeField.php and 2 other locations - About 1 hr to fix
                      src/KraftHaus/Bauhaus/Field/DateField.php on lines 1..47
                      src/KraftHaus/Bauhaus/Field/DatetimeField.php on lines 1..47

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

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

                      <?php
                      
                      namespace KraftHaus\Bauhaus\Field;
                      
                      /**
                      Severity: Major
                      Found in src/KraftHaus/Bauhaus/Field/DatetimeField.php and 2 other locations - About 1 hr to fix
                      src/KraftHaus/Bauhaus/Field/DateField.php on lines 1..47
                      src/KraftHaus/Bauhaus/Field/TimeField.php on lines 1..48

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

                      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 isEmptyDataObject( obj ) {
                          var name;
                          for ( name in obj ) {
                      
                              // if the public data object is empty, the private is still empty
                      Severity: Major
                      Found in bower_components/jquery/src/data.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/dist/jquery.js on lines 3665..3679

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

                      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 isEmptyDataObject( obj ) {
                          var name;
                          for ( name in obj ) {
                      
                              // if the public data object is empty, the private is still empty
                      Severity: Major
                      Found in bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
                      bower_components/jquery/src/data.js on lines 43..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 72.

                      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 (!altCtrl.value() || (e.lastControl && altCtrl.value() == e.lastControl.text())) {
                                              altCtrl.value(e.control.text());
                                          }
                      Severity: Major
                      Found in bower_components/tinymce/plugins/image/plugin.js and 1 other location - About 1 hr to fix
                      bower_components/tinymce/plugins/link/plugin.js on lines 66..68

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

                      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 (!textCtrl.value() || (e.lastControl && textCtrl.value() == e.lastControl.text())) {
                                      textCtrl.value(e.control.text());
                                  }
                      Severity: Major
                      Found in bower_components/tinymce/plugins/link/plugin.js and 1 other location - About 1 hr to fix
                      bower_components/tinymce/plugins/image/plugin.js on lines 259..261

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

                      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 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/dist/jquery.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language