APO-Epsilon/apo-website

View on GitHub

Showing 167 of 11,898 total issues

File service_admin_week.php has 458 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
require_once ('session.php');
require_once ('mysql_access.php');
require_once ('service_admin_functions.php');
?>
Severity: Minor
Found in service_admin_week.php - About 7 hrs to fix

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

    function show_page() {
      require_once('mysql_access.php');
    ?>
      <div class='large-12 medium-12 small-12 column'>
        <h1>Member Information</h1>
    Severity: Minor
    Found in members_list.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

    Function show_active has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

    function show_active() {
        
        include('mysql_access.php');
        global $current_semester;
        $user_id = $_SESSION['sessionID'];    
    Severity: Minor
    Found in req_view.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 show_exec has 149 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function show_exec() {
            //Let's get a whole bunch of data
            include('../mysql_access.php');
            //Let's count all the registrants
            $sql = "SELECT COUNT(*) AS num_reg FROM conf_contact_information;";
    Severity: Major
    Found in r8conf2016/registration_summary.php - About 5 hrs to fix

      Method show_active has 147 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function show_active() {
          
          include('mysql_access.php');
          global $current_semester;
          $user_id = $_SESSION['sessionID'];    
      Severity: Major
      Found in req_view.php - About 5 hrs to fix

        Method display has 143 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function display($event_type) {
                include('mysql_access.php');
                $user_id = $_SESSION['sessionID'];
        
                echo "Displaying " . $event_type . " Events";
        Severity: Major
        Found in event_signup.php - About 5 hrs to fix

          File service_hours.php has 396 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          include ('session.php');
          include ('requirements.php');
          include ('mysql_access.php');
          ?>
          Severity: Minor
          Found in service_hours.php - About 5 hrs to fix

            Consider simplifying this complex logical expression.
            Open

              else if ($description == 'KCOM' || $description == 'Lancaster' || $description == 'CSI Friday' || $description == 'Ray Miller' || $description == 'Pop-Tab Collection' ||$description == 'Twin Pines' ||$description == 'Humane Society' ||$description == 'Adair Co. Library' ||$description == 'Recycling Center' ||$description == 'Bought Hours' ||$description == 'Camp' ||$description == 'Bake sale' ||$description == 'Large Service Project' ||$description == 'Other Service Project' ||$description == 'Non-APO Hours' || $description == 'NMCAA' || $description == 'Multicultural Affairs Center' || $description == "MAC" || $description == 'Highway Cleanup' || $description == 'SAA Babysitting') {
                $result = "<div class='entry'>The description cannot be the same as the event. Please enter a valid description.<br/></div>";
              }
              else {
                $insert = "INSERT INTO apo.recorded_hours (user_id, event, month, day, year, date, description, hours, servicetype, fundraising, semester, youth) values('$id', '$event', '$month','$day', '$year', '$date', '$description', '$hours', '$servicetype', '$fundraising', '$semester', '$youth') ON DUPLICATE KEY UPDATE description='NEEDS NEW DESCRIPTION';";
            Severity: Critical
            Found in service_hours.php - About 5 hrs to fix

              File foundation.js has 374 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * Foundation Responsive Library
               * http://foundation.zurb.com
               * Copyright 2014, ZURB
               * Free to use under the MIT license.
              Severity: Minor
              Found in r8conf2016/js/foundation/foundation.js - About 5 hrs to fix

                Function show_active has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                Open

                function show_active() {
                  include('../mysql_access.php');
                  $big_array = [];
                  $little_array = [];
                
                
                Severity: Minor
                Found in includes/family_tree_add_ajax.php - About 4 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 show_active has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function show_active() {
                
                    include('mysql_access.php');
                    $position = $_SESSION['sessionposition'];
                    echo $position;
                Severity: Major
                Found in edit_exec.php - About 4 hrs to fix

                  Method display_event_table has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function display_event_table($rtype)
                  {
                      include('mysql_access.php');
                      $user_id = $_SESSION['sessionID'];
                      //get events for the user
                  Severity: Major
                  Found in check_requirements.php - About 4 hrs to fix

                    Function print_daily has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function print_daily($day) {
                    
                        include('mysql_access.php');
                    
                        $gen=$db->query("SELECT * FROM events_listing WHERE event_type='Regular' ORDER BY event_name");
                    Severity: Minor
                    Found in event_signup.php - About 4 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 show_active has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function show_active() {
                        echo "<h1>Events you are leading:</h1>";
                    
                        $user_id = $_SESSION['sessionID'];
                           include('mysql_access.php');
                    Severity: Major
                    Found in leader_list.php - About 4 hrs to fix

                      Function show_active has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function show_active() {
                          //dropdown list of events
                          ?>
                          <h1> Attendance Check-In </h1>
                              <?php
                      Severity: Minor
                      Found in rec_sec_attendance_tool.php - About 4 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 show_public has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function show_public() {
                        include('mysql_access.php');
                        //generate dot for viz.js
                      ?>
                        <script type='text/vnd.graphviz' id='family_tree_script'>
                      Severity: Major
                      Found in family_tree.php - About 4 hrs to fix

                        File foundation.reveal.js has 333 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        ;(function ($, window, document, undefined) {
                          'use strict';
                        
                          Foundation.libs.reveal = {
                            name : 'reveal',
                        Severity: Minor
                        Found in r8conf2016/js/foundation/foundation.reveal.js - About 4 hrs to fix

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

                          function print_daily($day) {
                          
                              include('mysql_access.php');
                          
                              $gen=$db->query("SELECT * FROM events_listing WHERE event_type='Regular' ORDER BY event_name");
                          Severity: Major
                          Found in event_signup.php - About 3 hrs to fix

                            Method list_stats has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function list_stats($hours_id, $semester) {
                              include ('mysql_access.php');
                              include('requirements.php');
                              // Total Hours
                              $sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
                            Severity: Major
                            Found in check_requirements.php - About 3 hrs to fix

                              File updateinfo.php has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              require_once ('session.php');
                              require_once ('mysql_access.php');
                              ?>
                              <!doctype html>
                              Severity: Minor
                              Found in updateinfo.php - About 3 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language