krafthaus/bauhaus

View on GitHub

Showing 1,049 of 1,049 total issues

Function move has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function move(d) {
        var i, z = [], le = getParentLayer(editor.selection.getNode()), ci = -1, fi = -1, nl;

        nl = [];
        tinymce.walk(editor.getBody(), function(n) {
Severity: Minor
Found in bower_components/tinymce/plugins/layer/plugin.js - About 1 hr to fix

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

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

      Method render has 43 lines of code (exceeds 25 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 1 hr to fix

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

        jQuery.ajaxSetup({
            accepts: {
                script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
            },
            contents: {
        Severity: Major
        Found in bower_components/jquery/src/ajax/script.js and 1 other location - About 1 hr to fix
        bower_components/jquery/dist/jquery.js on lines 9729..9742

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

        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

        jQuery.ajaxSetup({
            accepts: {
                script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
            },
            contents: {
        Severity: Major
        Found in bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
        bower_components/jquery/src/ajax/script.js on lines 7..20

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

        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

                    menu: [
                        {text: 'Insert column before', onclick: cmd('mceTableInsertColBefore'), onPostRender: postRenderCell},
                        {text: 'Insert column after', onclick: cmd('mceTableInsertColAfter'), onPostRender: postRenderCell},
                        {text: 'Delete column', onclick: cmd('mceTableDeleteCol'), onPostRender: postRenderCell}
                    ]
        Severity: Major
        Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 1 hr to fix
        bower_components/tinymce/plugins/table/plugin.js on lines 2489..2493

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

        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

                    menu: [
                        {text: 'Cell properties', onclick: cmd('mceTableCellProps'), onPostRender: postRenderCell},
                        {text: 'Merge cells', onclick: cmd('mceTableMergeCells'), onPostRender: postRenderCell},
                        {text: 'Split cell', onclick: cmd('mceTableSplitCells'), onPostRender: postRenderCell}
                    ]
        Severity: Major
        Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 1 hr to fix
        bower_components/tinymce/plugins/table/plugin.js on lines 2515..2519

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

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

          , show: function () {
              var $tip
                , pos
                , actualWidth
                , actualHeight
        Severity: Minor
        Found in bower_components/bootstrap/docs/assets/js/bootstrap.js - About 1 hr to fix

          Function createPasteBin has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function createPasteBin() {
                      var dom = editor.dom, body = editor.getBody();
                      var viewport = editor.dom.getViewPort(editor.getWin()), scrollTop = viewport.y, top = 20;
                      var scrollContainer;
          
          
          Severity: Minor
          Found in bower_components/tinymce/plugins/paste/plugin.js - About 1 hr to fix

            Function _punbb_html2bbcode has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _punbb_html2bbcode : function(s) {
                        s = tinymce.trim(s);
            
                        function rep(re, str) {
                            s = s.replace(re, str);
            Severity: Minor
            Found in bower_components/tinymce/plugins/bbcode/plugin.js - About 1 hr to fix

              Function show has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                , show: function () {
                    var $tip
                      , pos
                      , actualWidth
                      , actualHeight
              Severity: Minor
              Found in bower_components/bootstrap/js/bootstrap-tooltip.js - About 1 hr to fix

                Function createNewTextBlock has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function createNewTextBlock(contentNode, blockName) {
                            var node, textBlock, fragment = dom.createFragment(), hasContentNode;
                            var blockElements = editor.schema.getBlockElements();
                
                            if (editor.settings.forced_root_block) {
                Severity: Minor
                Found in bower_components/tinymce/plugins/lists/plugin.js - About 1 hr to fix

                  Function show has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    , show: function () {
                        var $tip
                          , pos
                          , actualWidth
                          , actualHeight
                  Severity: Minor
                  Found in bower_components/bootstrap/docs/assets/js/bootstrap-tooltip.js - About 1 hr to fix

                    Method create has 42 lines of code (exceeds 25 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

                      Consider simplifying this complex logical expression.
                      Open

                                  if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                                      ( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
                                      ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                                      !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
                      
                      
                      Severity: Critical
                      Found in bower_components/jquery/src/manipulation.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                                        ( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
                                        ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                                        !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
                        
                        
                        Severity: Critical
                        Found in bower_components/jquery/dist/jquery.js - About 1 hr to fix

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

                          isXML = Sizzle.isXML = function( elem ) {
                              // documentElement is verified for cases where it doesn't yet exist
                              // (such as loading iframes in IE - #4833)
                              var documentElement = elem && (elem.ownerDocument || elem).documentElement;
                              return documentElement ? documentElement.nodeName !== "HTML" : false;
                          Severity: Major
                          Found in bower_components/jquery/dist/jquery.js and 1 other location - About 1 hr to fix
                          bower_components/jquery/src/sizzle/dist/sizzle.js on lines 451..456

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

                          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

                          isXML = Sizzle.isXML = function( elem ) {
                              // documentElement is verified for cases where it doesn't yet exist
                              // (such as loading iframes in IE - #4833)
                              var documentElement = elem && (elem.ownerDocument || elem).documentElement;
                              return documentElement ? documentElement.nodeName !== "HTML" : false;
                          Severity: Major
                          Found in bower_components/jquery/src/sizzle/dist/sizzle.js and 1 other location - About 1 hr to fix
                          bower_components/jquery/dist/jquery.js on lines 1036..1041

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

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

                                  function fixTableCellSelection() {
                                      function tableCellSelected(ed, rng, n, currentCell) {
                                          // The decision of when a table cell is selected is somewhat involved.  The fact that this code is
                                          // required is actually a pointer to the root cause of this bug. A cell is selected when the start
                                          // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
                          Severity: Minor
                          Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

                            Function indent has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function indent(li) {
                                        var sibling, newList;
                            
                                        function mergeLists(from, to) {
                                            var node;
                            Severity: Minor
                            Found in bower_components/tinymce/plugins/lists/plugin.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language