ampache/ampache

View on GitHub
public/lib/modules/rhinoslider/js/easing.js

Summary

Maintainability
F
4 days
Test Coverage

`` has 31 functions (exceeds 20 allowed). Consider refactoring.
Open

{
    def: "easeOutQuad",
    swing(x, t, b, c, d) {
        //alert(jQuery.easing.default);
        return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
Severity: Minor
Found in public/lib/modules/rhinoslider/js/easing.js - About 3 hrs to fix

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

        easeOutBack(x, t, b, c, d, s) {
    Severity: Minor
    Found in public/lib/modules/rhinoslider/js/easing.js - About 45 mins to fix

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

          easeInBack(x, t, b, c, d, s) {
      Severity: Minor
      Found in public/lib/modules/rhinoslider/js/easing.js - About 45 mins to fix

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

            easeInOutBack(x, t, b, c, d, s) {
        Severity: Minor
        Found in public/lib/modules/rhinoslider/js/easing.js - About 45 mins to fix

          Function easeInOutSine has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              easeInOutSine(x, t, b, c, d) {
          Severity: Minor
          Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

            Function easeInQuint has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                easeInQuint(x, t, b, c, d) {
            Severity: Minor
            Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

              Function easeOutCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  easeOutCirc(x, t, b, c, d) {
              Severity: Minor
              Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                Function easeInBounce has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    easeInBounce(x, t, b, c, d) {
                Severity: Minor
                Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                  Function easeInCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      easeInCubic(x, t, b, c, d) {
                  Severity: Minor
                  Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                    Function easeInCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        easeInCirc(x, t, b, c, d) {
                    Severity: Minor
                    Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                      Function easeInOutCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          easeInOutCubic(x, t, b, c, d) {
                      Severity: Minor
                      Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                        Function easeInElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            easeInElastic(x, t, b, c, d) {
                        Severity: Minor
                        Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                          Function easeInQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              easeInQuart(x, t, b, c, d) {
                          Severity: Minor
                          Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                            Function easeInExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                easeInExpo(x, t, b, c, d) {
                            Severity: Minor
                            Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                              Function easeOutElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  easeOutElastic(x, t, b, c, d) {
                              Severity: Minor
                              Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                Function easeInOutQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    easeInOutQuad(x, t, b, c, d) {
                                Severity: Minor
                                Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                  Function easeInOutElastic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      easeInOutElastic(x, t, b, c, d) {
                                  Severity: Minor
                                  Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                    Function easeOutQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        easeOutQuart(x, t, b, c, d) {
                                    Severity: Minor
                                    Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                      Function easeOutBounce has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          easeOutBounce(x, t, b, c, d) {
                                      Severity: Minor
                                      Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                        Function easeInOutBounce has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            easeInOutBounce(x, t, b, c, d) {
                                        Severity: Minor
                                        Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                          Function easeOutSine has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                              easeOutSine(x, t, b, c, d) {
                                          Severity: Minor
                                          Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                            Function easeOutQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                easeOutQuad(x, t, b, c, d) {
                                            Severity: Minor
                                            Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                              Function easeInOutExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  easeInOutExpo(x, t, b, c, d) {
                                              Severity: Minor
                                              Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                Function easeOutQuint has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    easeOutQuint(x, t, b, c, d) {
                                                Severity: Minor
                                                Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                  Function swing has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      swing(x, t, b, c, d) {
                                                  Severity: Minor
                                                  Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                    Function easeInOutQuint has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        easeInOutQuint(x, t, b, c, d) {
                                                    Severity: Minor
                                                    Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                      Function easeOutExpo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          easeOutExpo(x, t, b, c, d) {
                                                      Severity: Minor
                                                      Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                        Function easeInOutCirc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            easeInOutCirc(x, t, b, c, d) {
                                                        Severity: Minor
                                                        Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                          Function easeOutCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              easeOutCubic(x, t, b, c, d) {
                                                          Severity: Minor
                                                          Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                            Function easeInOutQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                easeInOutQuart(x, t, b, c, d) {
                                                            Severity: Minor
                                                            Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                              Function easeInSine has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                  easeInSine(x, t, b, c, d) {
                                                              Severity: Minor
                                                              Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                                Function easeInQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                    easeInQuad(x, t, b, c, d) {
                                                                Severity: Minor
                                                                Found in public/lib/modules/rhinoslider/js/easing.js - About 35 mins to fix

                                                                  Function easeInOutElastic has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                  Open

                                                                      easeInOutElastic(x, t, b, c, d) {
                                                                          var s=1.70158;var p=0;var a=c;
                                                                          if (t===0) {return b;}  if ((t/=d/2)===2) {return b+c;}  if (!p) {p=d*(.3*1.5);}
                                                                          if (a < Math.abs(c)) { a=c; var s=p/4; }
                                                                          else { var s = p/(2*Math.PI) * Math.asin (c/a); }
                                                                  Severity: Minor
                                                                  Found in public/lib/modules/rhinoslider/js/easing.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

                                                                      easeInOutQuint(x, t, b, c, d) {
                                                                          if ((t/=d/2) < 1) {
                                                                              return c/2*t*t*t*t*t + b;
                                                                          }
                                                                          return c/2*((t-=2)*t*t*t*t + 2) + b;
                                                                  Severity: Major
                                                                  Found in public/lib/modules/rhinoslider/js/easing.js and 1 other location - About 3 hrs to fix
                                                                  public/lib/modules/rhinoslider/js/rhinoslider-1.05.js on lines 22..27

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

                                                                  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

                                                                          if (a < Math.abs(c)) { a=c; var s=p/4; }
                                                                          else {var s = p/(2*Math.PI) * Math.asin (c/a);}
                                                                  Severity: Major
                                                                  Found in public/lib/modules/rhinoslider/js/easing.js and 2 other locations - About 2 hrs to fix
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 131..132
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 145..146

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

                                                                  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

                                                                          if (a < Math.abs(c)) { a=c; var s=p/4; }
                                                                          else { var s = p/(2*Math.PI) * Math.asin (c/a); }
                                                                  Severity: Major
                                                                  Found in public/lib/modules/rhinoslider/js/easing.js and 2 other locations - About 2 hrs to fix
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 138..139
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 145..146

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

                                                                  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

                                                                          if (a < Math.abs(c)) { a=c; var s=p/4; }
                                                                          else { var s = p/(2*Math.PI) * Math.asin (c/a); }
                                                                  Severity: Major
                                                                  Found in public/lib/modules/rhinoslider/js/easing.js and 2 other locations - About 2 hrs to fix
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 131..132
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 138..139

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

                                                                  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 (t < 1) { return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }
                                                                  Severity: Major
                                                                  Found in public/lib/modules/rhinoslider/js/easing.js and 1 other location - About 1 hr to fix
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 133..133

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

                                                                  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

                                                                          return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
                                                                  Severity: Major
                                                                  Found in public/lib/modules/rhinoslider/js/easing.js and 1 other location - About 1 hr to fix
                                                                  public/lib/modules/rhinoslider/js/easing.js on lines 147..147

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

                                                                  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 ((t/=d/2) < 1) { return c/2 * Math.pow(2, 10 * (t - 1)) + b; }
                                                                  Severity: Minor
                                                                  Found in public/lib/modules/rhinoslider/js/easing.js and 1 other location - About 50 mins to fix
                                                                  public/lib/modules/rhinoslider/js/rhinoslider-1.05.js on lines 17..19

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

                                                                  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