CORE-POS/IS4C

View on GitHub
fannie/modules/plugins2.0/TimesheetPlugin/TsWagesReport.php

Summary

Maintainability
D
2 days
Test Coverage

Method body_content has 174 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function body_content(){
        global $FANNIE_OP_DB, $FANNIE_PLUGIN_SETTINGS;
        $ts_db = FannieDB::get($FANNIE_PLUGIN_SETTINGS['TimesheetDatabase']);

        include('./includes/header.html');
Severity: Major
Found in fannie/modules/plugins2.0/TimesheetPlugin/TsWagesReport.php - About 6 hrs to fix

    Function body_content has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
    Open

        function body_content(){
            global $FANNIE_OP_DB, $FANNIE_PLUGIN_SETTINGS;
            $ts_db = FannieDB::get($FANNIE_PLUGIN_SETTINGS['TimesheetDatabase']);
    
            include('./includes/header.html');
    Severity: Minor
    Found in fannie/modules/plugins2.0/TimesheetPlugin/TsWagesReport.php - About 6 hrs 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

    Method javascript_content has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function javascript_content(){
            ob_start();
            ?>
            ZeroClipboard.setMoviePath( '../src/ZeroClipboard10.swf' );
            var clip = new ZeroClipboard.Client();
    Severity: Major
    Found in fannie/modules/plugins2.0/TimesheetPlugin/TsWagesReport.php - About 2 hrs to fix

      File TsWagesReport.php has 255 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      include(dirname(__FILE__).'/../../../config.php');
      if (!class_exists('FannieAPI')) {
          include_once(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
      }
      Severity: Minor
      Found in fannie/modules/plugins2.0/TimesheetPlugin/TsWagesReport.php - About 2 hrs to fix

        There are no issues that match your filters.

        Category
        Status