openva/rs-machine

View on GitHub

Showing 10 of 408 total issues

File cleanup.php has 685 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

###
# MISC. DATA CLEAN UP FUNCTIONS
#
Severity: Major
Found in cron/cleanup.php - About 1 day to fix

    File resolve_chyrons.php has 420 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

     <?php
    
    // Store the prior match and try it as the first option on the next time around. No need to
    // start from zero when we know there's a pretty good chance that each name is going to
    // occur repeatedly.
    Severity: Minor
    Found in utilities/resolve_chyrons.php - About 6 hrs to fix

      File meetings.php has 282 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      ###
      # Retrieve and Store the Meeting Schedule
      #
      Severity: Minor
      Found in cron/meetings.php - About 2 hrs to fix

        File legislators.php has 266 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /*
         * Connect to the database
         */
        Severity: Minor
        Found in cron/legislators.php - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                   if (
                       (substr($chyron['raw_text'], 0, 2) == 's8')
                       ||
                       (substr($chyron['raw_text'], 0, 2) == '58')
                       ||
          Severity: Critical
          Found in utilities/resolve_chyrons.php - About 2 hrs to fix

            File detect_faces.php has 259 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            error_reporting(E_ALL);
            ini_set('display_errors', 1);
            
            
            Severity: Minor
            Found in utilities/detect_faces.php - About 2 hrs to fix

              Avoid deeply nested control flow statements.
              Open

                              if ($result === false) {
                                  $log->put('SQL statement failed when adding history data for ' . $bill['number'], 7);
                              }
              Severity: Major
              Found in cron/history.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                if ($success === false) {
                                    $log->put('Could not create directory ' . $downloads_dir . 'bills/' . $bill['year'], 8);
                                    return false;
                                }
                Severity: Major
                Found in cron/export.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  if ($bill['id'] != false) {
                                      $mc->delete('bill-' . $bill['id']);
                                  }
                  Severity: Major
                  Found in cron/history.php - About 45 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                if (
                                        ($meeting['date'] == $known['date'])
                                        &&
                                        ($meeting['description'] == $known['description'])
                                        &&
                    Severity: Major
                    Found in cron/meetings.php - About 40 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language