krafthaus/bauhaus

View on GitHub

Showing 476 of 1,049 total issues

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

                fillHours = function () {
                    pMoment.lang(picker.options.language);
                    var table = picker.widget.find('.timepicker .timepicker-hours table'), html = '', current, i, j;
                    table.parent().hide();
                    if (picker.use24hours) {

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

        offset: function( options ) {
            if ( arguments.length ) {
                return options === undefined ?
                    this :
                    this.each(function( i ) {
    Severity: Minor
    Found in bower_components/jquery/src/offset.js - About 1 hr to fix

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

                      function insertLink() {
                          var linkAttrs = {
                              href: href,
                              target: data.target ? data.target : null,
                              rel: data.rel ? data.rel : null,
      Severity: Minor
      Found in bower_components/tinymce/plugins/link/plugin.js - About 1 hr to fix

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

            function save() {
                var formObj;
        
                formObj = tinymce.DOM.getParent(editor.id, 'form');
        
        
        Severity: Minor
        Found in bower_components/tinymce/plugins/save/plugin.js - About 1 hr to fix

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

                  function cellSelectionHandler(e) {
                      var sel, table, target = e.target;
          
                      if (resizing) {
                          return;
          Severity: Minor
          Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                    function pasteImageData(e, rng) {
                        var dataTransfer = e.clipboardData || e.dataTransfer;
            
                        function processItems(items) {
                            var i, item, reader;
            Severity: Minor
            Found in bower_components/tinymce/plugins/paste/plugin.js - About 1 hr to fix

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

                , keydown: function (e) {
                    var $this
                      , $items
                      , $active
                      , $parent
              Severity: Minor
              Found in bower_components/bootstrap/docs/assets/js/bootstrap.js - About 1 hr to fix

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

                  , keydown: function (e) {
                      var $this
                        , $items
                        , $active
                        , $parent
                Severity: Minor
                Found in bower_components/bootstrap/js/bootstrap-dropdown.js - About 1 hr to fix

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

                              function restoreEndPoint(start) {
                                  var container, offset, node;
                  
                                  function nodeIndex(container) {
                                      var node = container.parentNode.firstChild, idx = 0;
                  Severity: Minor
                  Found in bower_components/tinymce/plugins/lists/plugin.js - About 1 hr to fix

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

                    function parse_flags(flags, options) {
                    
                        var ret = {
                            theme: settings.themes.gray
                        }, render = false;
                    Severity: Minor
                    Found in bower_components/bootstrap/docs/assets/js/holder/holder.js - About 1 hr to fix

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

                                  end: function(name) {
                                      if (name == "video" && updateAll) {
                                          for (var index = 1; index <= 2; index++) {
                                              if (data["source" + index]) {
                                                  var attrs = [];
                      Severity: Minor
                      Found in bower_components/tinymce/plugins/media/plugin.js - About 1 hr to fix

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

                                function cleanup() {
                                    var rng = dom.createRng(), row;
                        
                                    // Empty rows
                                    each(dom.select('tr', table), function(tr) {
                        Severity: Minor
                        Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                            , keydown: function (e) {
                                var $this
                                  , $items
                                  , $active
                                  , $parent
                          Severity: Minor
                          Found in bower_components/bootstrap/docs/assets/js/bootstrap-dropdown.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                            support.getById && context.nodeType === 9 && documentIsHTML &&
                                            Expr.relative[ tokens[1].type ] ) {
                            
                                        context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                            Severity: Major
                            Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                      if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                              support.getById && context.nodeType === 9 && documentIsHTML &&
                                              Expr.relative[ tokens[1].type ] ) {
                              
                                          context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                              Severity: Major
                              Found in bower_components/jquery/src/sizzle/dist/sizzle.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 &&
                                                    (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) &&
                                                    last.previousSibling && last.previousSibling.nodeName == "TABLE") {
                                                    editor.dom.remove(last);
                                                }
                                Severity: Major
                                Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

                                  Function render has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function render()
                                      {
                                          if ($this->getDisplayField() === null) {
                                              throw new \InvalidArgumentException(sprintf('Please provide a display field for the `%s` relation via the display(); method.', $this->getName()));
                                          }
                                  Severity: Minor
                                  Found in src/KraftHaus/Bauhaus/Field/BelongsToField.php - About 55 mins 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 access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                  Severity: Major
                                  Found in bower_components/jquery/dist/jquery.js - About 50 mins to fix

                                    Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                    Severity: Major
                                    Found in bower_components/jquery/src/core/access.js - About 50 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if ( conv && s[ "throws" ] ) {
                                                              response = conv( response );
                                                          } else {
                                                              try {
                                                                  response = conv( response );
                                      Severity: Major
                                      Found in bower_components/jquery/dist/jquery.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language