CORE-POS/IS4C

View on GitHub
fannie/modules/plugins2.0/HrWeb/Screening/ScreeningPage.php

Summary

Maintainability
D
2 days
Test Coverage

Method post_view has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function post_view()
    {
        $empID = FormLib::get('lookup', -1);
        $dbc = FannieDB::get($this->config->get('OP_DB'));

Severity: Major
Found in fannie/modules/plugins2.0/HrWeb/Screening/ScreeningPage.php - About 4 hrs to fix

    File ScreeningPage.php has 354 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    include(__DIR__ . '/../../../../config.php');
    if (!class_exists('FannieAPI')) {
        include(__DIR__ . '/../../../../classlib2.0/FannieAPI.php');
    Severity: Minor
    Found in fannie/modules/plugins2.0/HrWeb/Screening/ScreeningPage.php - About 4 hrs to fix

      Method get_view has 98 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function get_view()
          {
              $dbc = FannieDB::get($this->config->get('OP_DB'));
              $nonce = uniqid('', true);
              $setP = $dbc->prepare("UPDATE " . FannieDB::fqn('ScreeningNonce', 'plugin:HrWebDB') . " SET nonce=?");
      Severity: Major
      Found in fannie/modules/plugins2.0/HrWeb/Screening/ScreeningPage.php - About 3 hrs to fix

        Method post_id_view has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function post_id_view()
            {
                $dbc = FannieDB::get($this->config->get('OP_DB'));
        
                $any = FormLib::get('any') ? 1 : 0;
        Severity: Major
        Found in fannie/modules/plugins2.0/HrWeb/Screening/ScreeningPage.php - About 2 hrs to fix

          Function post_id_view has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              protected function post_id_view()
              {
                  $dbc = FannieDB::get($this->config->get('OP_DB'));
          
                  $any = FormLib::get('any') ? 1 : 0;
          Severity: Minor
          Found in fannie/modules/plugins2.0/HrWeb/Screening/ScreeningPage.php - About 45 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

          There are no issues that match your filters.

          Category
          Status