insideout10/wordlift-plugin-js

View on GitHub
app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js

Summary

Maintainability
F
1 wk
Test Coverage

Function generateCSS has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
Open

function generateCSS() {
    var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;

    ce.style.cssText = "";
Severity: Minor
Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 1 day 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

File props.js has 548 lines of code (exceeds 250 allowed). Consider refactoring.
Open

tinyMCEPopup.requireLangPack();

var defaultFonts = "" + 
    "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + 
    "Times New Roman, Times, serif=Times New Roman, Times, serif;" + 
Severity: Major
Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 1 day to fix

    Function generateCSS has 119 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function generateCSS() {
        var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
    
        ce.style.cssText = "";
    
    Severity: Major
    Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 4 hrs to fix

      Function setupFormData has 84 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function setupFormData() {
          var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
      
          // Setup text fields
      
      Severity: Major
      Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 3 hrs to fix

        Function init has 79 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function init(ed) {
            var ce = document.getElementById('container'), h;
        
            existingStyles = aggregateStyles(tinyMCEPopup.getWindowArg('styles'));
            ce.style.cssText = tinyMCEPopup.editor.dom.serializeStyle(existingStyles);
        Severity: Major
        Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 3 hrs to fix

          Function fillSelect has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

          function fillSelect(f, s, param, dval, sep, em) {
              var i, ar, p, se;
          
              f = document.forms[f];
              sep = typeof(sep) == "undefined" ? ";" : sep;
          Severity: Minor
          Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - 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 setupBox has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function setupBox(f, ce, fp, pr, sf, b) {
              if (typeof(b) == "undefined")
                  b = ['Top', 'Right', 'Bottom', 'Left'];
          
              if (isSame(ce, pr, sf, b)) {
          Severity: Minor
          Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 1 hr to fix

            Function isSame has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            function isSame(e, pr, sf, b) {
                var a = [], i, x;
            
                if (typeof(b) == "undefined")
                    b = ['Top', 'Right', 'Bottom', 'Left'];
            Severity: Minor
            Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - 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 hasEqualValues has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            function hasEqualValues(a) {
                var i, x;
            
                for (i=0; i<a.length; i++) {
                    if (a[i] == null)
            Severity: Minor
            Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 45 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 setupBox has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function setupBox(f, ce, fp, pr, sf, b) {
            Severity: Minor
            Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if (mergedStyles[name].indexOf(parsedStyles[name]) === -1) {
                                          mergedStyles[name] = mergedStyles[name] +' '+ parsedStyles[name];
                                      }
              Severity: Major
              Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 45 mins to fix

                Function fillSelect has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function fillSelect(f, s, param, dval, sep, em) {
                Severity: Minor
                Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 45 mins to fix

                  Function setupBox has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function setupBox(f, ce, fp, pr, sf, b) {
                      if (typeof(b) == "undefined")
                          b = ['Top', 'Right', 'Bottom', 'Left'];
                  
                      if (isSame(ce, pr, sf, b)) {
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 35 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 showDisabledControls has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function showDisabledControls() {
                      var f = document.forms, i, a;
                  
                      for (i=0; i<f.length; i++) {
                          for (a=0; a<f[i].elements.length; a++) {
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 25 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 toggleSame has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function toggleSame(ce, pre) {
                      var el = document.forms[0].elements, i;
                  
                      if (ce.checked) {
                          el[pre + "_top"].disabled = false;
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js - About 25 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

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

                      if (!f.box_padding_same.checked) {
                          ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
                          ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
                          ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
                          ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 1 day to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 530..536

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

                  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 (!f.border_width_same.checked) {
                          ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
                          ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
                          ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
                          ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 1 day to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 504..510

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

                  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

                      } else {
                          el[pre + "_top"].disabled = false;
                          el[pre + "_right"].disabled = false;
                          el[pre + "_bottom"].disabled = false;
                          el[pre + "_left"].disabled = false;
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 6 hrs to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 658..670

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

                  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 (ce.checked) {
                          el[pre + "_top"].disabled = false;
                          el[pre + "_right"].disabled = true;
                          el[pre + "_bottom"].disabled = true;
                          el[pre + "_left"].disabled = true;
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 6 hrs to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 670..682

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

                  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 (!f.border_color_same.checked) {
                          ce.style.borderTopColor = f.border_color_top.value;
                          ce.style.borderRightColor = f.border_color_right.value;
                          ce.style.borderBottomColor = f.border_color_bottom.value;
                          ce.style.borderLeftColor = f.border_color_left.value;
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 3 hrs to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 522..528

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

                  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 (!f.border_style_same.checked) {
                          ce.style.borderTopStyle = f.border_style_top.value;
                          ce.style.borderRightStyle = f.border_style_right.value;
                          ce.style.borderBottomStyle = f.border_style_bottom.value;
                          ce.style.borderLeftStyle = f.border_style_left.value;
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 3 hrs to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 538..544

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

                  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

                      for (i=0; i<a.length; i++) {
                          if (a[i] == null)
                              return false;
                  
                          for (x=0; x<a.length; x++) {
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 2 hrs to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 389..397

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

                  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

                      for (i=0; i<a.length; i++) {
                          if (a[i] == null)
                              return false;
                  
                          for (x=0; x<a.length; x++) {
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 2 hrs to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 373..381

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

                  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 (ce.style.width == "")
                          ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 1 hr to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 560..561

                  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

                      if (ce.style.height == "")
                          ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 1 hr to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 557..558

                  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

                      ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 1 hr to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 497..497

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

                  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

                      ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 1 hr to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 487..487

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

                  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

                          s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 2 other locations - About 40 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 582..582
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 583..583

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

                  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

                          s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 2 other locations - About 40 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 581..581
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 582..582

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

                  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

                          s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
                  Severity: Major
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 2 other locations - About 40 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 581..581
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 583..583

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

                  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

                      ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 40 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 474..474

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

                  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

                      ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 40 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 550..550

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

                  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

                      f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value);
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 2 other locations - About 35 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 232..232
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 233..233

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

                  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

                      f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value);
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 2 other locations - About 35 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 231..231
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 232..232

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

                  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

                      f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value);
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 2 other locations - About 35 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 231..231
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 233..233

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

                  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

                          s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 30 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 572..572

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

                  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

                          t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 30 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 584..584

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

                  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

                          s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 30 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 591..591

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

                  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

                          s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
                  Severity: Minor
                  Found in app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js and 1 other location - About 30 mins to fix
                  app/lib/tinymce/jscripts/tiny_mce/plugins/style/js/props.js on lines 481..481

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

                  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

                  There are no issues that match your filters.

                  Category
                  Status