ekinhbayar/gitamp

View on GitHub

Showing 7 of 27 total issues

Function GitAmp has 400 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const GitAmp = (function(exports, $) {
    'use strict';

    /**
     * AudioPlayer
Severity: Major
Found in public/js/main.js - About 2 days to fix

    Function GitAmp has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
    Open

    const GitAmp = (function(exports, $) {
        'use strict';
    
        /**
         * AudioPlayer
    Severity: Minor
    Found in public/js/main.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 main.js has 406 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const GitAmp = (function(exports, $) {
        'use strict';
    
        /**
         * AudioPlayer
    Severity: Minor
    Found in public/js/main.js - About 5 hrs to fix

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

          const Gui = (function() {
              const scaleFactor = 6;
              const textColor   = '#ffffff';
              const maxLife     = 20000;
      
      
      Severity: Major
      Found in public/js/main.js - About 4 hrs to fix

        Function AudioPlayer has 111 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            const AudioPlayer = (function() {
                // something somewhere needs a global volume variable
                // not sure what thing it is, but adding this line works
                exports.volume = localStorage.getItem('volume');
        
        
        Severity: Major
        Found in public/js/main.js - About 4 hrs to fix

          Function draw has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  Event.prototype.draw = function(width, height) {
                      let no_label = false;
                      let size     = this.getSize();
          
                      const self = this;
          Severity: Major
          Found in public/js/main.js - About 2 hrs to fix

            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function __construct(int $id, Type $type, Information $information, Ring $ring, BaseSound $sound)
            Severity: Minor
            Found in src/Event/BaseEvent.php - About 35 mins to fix
              Severity
              Category
              Status
              Source
              Language