freakimkaefig/Music-XML-Analyzer

View on GitHub

Showing 168 of 286 total issues

Function ResultView has a Cognitive Complexity of 305 (exceeds 5 allowed). Consider refactoring.
Open

MusicXMLAnalyzer.ResultView = function(){

    var that = {},

    $patternValue = null,
Severity: Minor
Found in public/js/views/ResultView.js - About 6 days 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 ScoreView has a Cognitive Complexity of 190 (exceeds 5 allowed). Consider refactoring.
Open

MusicXMLAnalyzer.ScoreView = function(){

    var that = {},

    $scoreValue = null,
Severity: Minor
Found in public/js/views/ScoreView.js - About 3 days 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 generateResultExtract has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring.
Open

    private function generateResultExtract($upload_id, $part_id, $voice, $startMeasure, $start, $endMeasure, $end) {
        set_time_limit(300);
        $upload = Upload::find($upload_id);

        $doc = new DOMDocument();
Severity: Minor
Found in app/controllers/ResultController.php - About 2 days 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 ResultView has 581 lines of code (exceeds 25 allowed). Consider refactoring.
Open

MusicXMLAnalyzer.ResultView = function(){

    var that = {},

    $patternValue = null,
Severity: Major
Found in public/js/views/ResultView.js - About 2 days to fix

    Function generateScore has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring.
    Open

        public function generateScore($uploadId, $partId) {
            $upload = Upload::find($uploadId);
            if ($upload) {
                $doc = new DOMDocument();
                $doc->loadXML($upload->content);
    Severity: Minor
    Found in app/controllers/ScoreController.php - About 2 days 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 PatternModel has 470 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    MusicXMLAnalyzer.PatternModel = function(){
    
        var that = {},
        noteElements = [],
        noteElements4VexFlow = [],
    Severity: Major
    Found in public/js/models/PatternModel.js - About 2 days to fix

      Function PatternModel has a Cognitive Complexity of 113 (exceeds 5 allowed). Consider refactoring.
      Open

      MusicXMLAnalyzer.PatternModel = function(){
      
          var that = {},
          noteElements = [],
          noteElements4VexFlow = [],
      Severity: Minor
      Found in public/js/models/PatternModel.js - About 2 days 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 DashboardView has 387 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      MusicXMLAnalyzer.DashboardView = function(){
      
          var that = {},
      
          $logMessages = null,
      Severity: Major
      Found in public/js/views/DashboardView.js - About 1 day to fix

        Function PatternController has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
        Open

        MusicXMLAnalyzer.PatternController = function() {
            var that = {},
            once = true,
            once2 = true,
            stop = false,
        Severity: Minor
        Found in public/js/controllers/PatternController.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

        Function ScoreView has 310 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        MusicXMLAnalyzer.ScoreView = function(){
        
            var that = {},
        
            $scoreValue = null,
        Severity: Major
        Found in public/js/views/ScoreView.js - About 1 day to fix

          Function NotationView has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
          Open

          MusicXMLAnalyzer.NotationView = function(){
          
              var that = {},
              context = null,
              canvas = null,
          Severity: Minor
          Found in public/js/views/NotationView.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

          Function DashboardModel has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
          Open

          MusicXMLAnalyzer.DashboardModel = function(){
          
              var that = {},
          
              URL_GET_UPLOAD_IDS = "/dashboard/getUploadIds",
          Severity: Minor
          Found in public/js/models/DashboardModel.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 SearchController.php has 623 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /**
           * Controller for analysis of uploads
           *
          Severity: Major
          Found in app/controllers/SearchController.php - About 1 day to fix

            Function DashboardModel has 264 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            MusicXMLAnalyzer.DashboardModel = function(){
            
                var that = {},
            
                URL_GET_UPLOAD_IDS = "/dashboard/getUploadIds",
            Severity: Major
            Found in public/js/models/DashboardModel.js - About 1 day to fix

              Function NotationView has 253 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              MusicXMLAnalyzer.NotationView = function(){
              
                  var that = {},
                  context = null,
                  canvas = null,
              Severity: Major
              Found in public/js/views/NotationView.js - About 1 day to fix

                Function ScoreController has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
                Open

                MusicXMLAnalyzer.ScoreController = function(){
                
                    var that = {},
                
                    view = null,
                Severity: Minor
                Found in public/js/controllers/ScoreController.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 ResultView.js has 583 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /** @constructor */
                MusicXMLAnalyzer.ResultView = function(){
                
                    var that = {},
                
                
                Severity: Major
                Found in public/js/views/ResultView.js - About 1 day to fix

                  Function PatternController has 243 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  MusicXMLAnalyzer.PatternController = function() {
                      var that = {},
                      once = true,
                      once2 = true,
                      stop = false,
                  Severity: Major
                  Found in public/js/controllers/PatternController.js - About 1 day to fix

                    Function PatternView has 241 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    MusicXMLAnalyzer.PatternView = function(){
                    
                        var that = {},
                        $modeButtonClass = $(".btn-mode"),
                    
                    
                    Severity: Major
                    Found in public/js/views/PatternView.js - About 1 day to fix

                      Function addNoteElement has 198 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          addNoteElement = function() {
                      
                              setValuesForNoteElement();
                      
                              if (curMode == 2) {
                      Severity: Major
                      Found in public/js/models/PatternModel.js - About 7 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language