Showing 168 of 286 total issues
Method _determineClef
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _determineClef($xml){
$clefs = $xml->xpath("//clef");
$clefsArray = array(
(object)array("label" => "soprano clef", "value" => 0 ),
Function _determineClef
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function _determineClef($xml){
$clefs = $xml->xpath("//clef");
$clefsArray = array(
(object)array("label" => "soprano clef", "value" => 0 ),
- Read upRead up
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 NotationView.js
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** @constructor */
MusicXMLAnalyzer.NotationView = function(){
var that = {},
context = null,
Method run
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
DB::table('results')->delete();
DB::table('uploads')->delete();
DB::table('users')->delete();
Function getDurationType
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function getDurationType($durationFloat) {
if ($durationFloat == 1){
return "whole";
} elseif ($durationFloat == 0.75) {
return "whole";
- Read upRead up
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 getDurationType
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function getDurationType($durationFloat) {
if ($durationFloat == 1){
return "whole";
} elseif ($durationFloat == 0.75) {
return "whole";
- Read upRead up
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 DashboardController
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
MusicXMLAnalyzer.DashboardController = function() {
var that = {},
model = null,
view = null,
Function ResultModel
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
MusicXMLAnalyzer.ResultModel = function() {
var that = {},
URL_POST_RESULT_EXTRACT = '/result/extract',
Function UploadView
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
MusicXMLAnalyzer.UploadView = function(){
var that = {},
$logMessages = null,
- Read upRead up
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
Method _countNoteTypes
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _countNoteTypes($xml){
$notes = $xml->xpath("//note");
$noteTypesArray = array(
(object)array("label" => "whole", "value" => 0 ),
Method _getKey
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function _getKey($id){
$xml = simplexml_load_string(Upload::find($id)->content);
$keys = $xml->xpath("//key");
$key = $keys[0];
Function init
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
init = function() {
patternView = MusicXMLAnalyzer.PatternView();
patternView.init();
notationView = MusicXMLAnalyzer.NotationView();
Function DashboardView
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
MusicXMLAnalyzer.DashboardView = function(){
var that = {},
$logMessages = null,
- Read upRead up
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 playTune
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
var playTune = function() {
if(i < notesToBePlayed.length){
var note = notesToBePlayed[i].note;
// how hard the note gets hit
Function playTune
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
var playTune = function() {
if(i < notesToBePlayed.length){
var note = notesToBePlayed[i].note;
// how hard the note gets hit
Function generateExportPdf
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateExportPdf = function() {
var doc = new jsPDF();
// add title page
doc.setFontSize(36);
Function _countNoteTypes
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function _countNoteTypes($xml){
$notes = $xml->xpath("//note");
$noteTypesArray = array(
(object)array("label" => "whole", "value" => 0 ),
- Read upRead up
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 initMeterDistribution
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
initMeterDistribution = function(data) {
var data2;
if(typeof(data) == 'string'){
data2 = [{label: data, value: 1}];
}else{
Method postUpload
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function postUpload() {
$user = User::find(Cookie::get('user_id'));
$file = Input::file('file');
if($file) {
$destinationPath = public_path() . '/uploads/' . $user->id . '/';
Method getDurationType
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getDurationType($durationFloat) {
if ($durationFloat == 1){
return "whole";
} elseif ($durationFloat == 0.75) {
return "whole";