APO-Epsilon/apo-website

View on GitHub

Showing 11,898 of 11,898 total issues

Method show_attendance has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function show_attendance(){
    //this will gather the event name and date from the submitted id.
    //condense to function
    $id = $_POST['event'];//WORKS
    $sql = "SELECT events.name AS name, occurrence.date AS date, occurrence.id AS id
Severity: Minor
Found in attendance_admin.php - About 1 hr to fix

    Function process_add has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

    function process_add(){//A.K.A. FUNCTION BITCH()
        $name = $_POST['name'];
        $day = $_POST['day'];
        $year = $_POST['year'];
        $month = $_POST['month'];
    Severity: Minor
    Found in attendance_admin.php - About 1 hr 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 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function show_exec() {
        include('../mysql_access.php');
        if(isset($_POST['page_text'])) {
            $page_text = $_POST['page_text'];
            $page_text = trim($page_text);
    Severity: Minor
    Found in r8conf2016/editable_page.php - About 1 hr to fix

      Method process_login has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function process_login(){
          require_once ('../mysql_access.php');
          $email = addslashes($_POST["email"]);
          $password = addslashes($_POST["password"]);
          $hasher = new PasswordHash(8, true);
      Severity: Minor
      Found in r8conf2016/login.php - About 1 hr to fix

        Method list_members_status_form has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function list_members_status_form($sql, $positions_options) {
          include ('mysql_access.php');
        
          $result = $db->query($sql) or exit("Error");
        
        
        Severity: Minor
        Found in member_statuses.php - About 1 hr to fix

          Method view has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function view($i){
            include('mysql_access.php');
            $id = $_SESSION['sessionID'];
          
          $sql = "SELECT d.detail_id, d.event_id, d.DOW,
          Severity: Minor
          Found in service_admin_week.php - About 1 hr to fix

            Method show_exec has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function show_exec() {
              include('mysql_access.php');
              if(isset($_POST['page_text'])) {
                $page_text = $_POST['page_text'];
                $page_text = trim($page_text);
            Severity: Minor
            Found in editable_page.php - About 1 hr to fix

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

              function show_active() {
                  include('mysql_access.php');
                  
                  //$response=$db->query("SELECT event_name,L_val,F_val,repeatable FROM events_listing WHERE event_type='Point'");
                  //$count = 0;
              Severity: Minor
              Found in check_requirements.php - About 1 hr to fix

                Method editPosting has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function editPosting($i){
                    include('mysql_access.php');
                    $sql = "SELECT c.firstname, c.lastname, c.id, l.detail_id, d.event_id, d.DOW, o.start, o.end, o.length, o.max,  e.name, o.theDate
                          FROM contact_information AS c
                          JOIN service_leaders AS l
                Severity: Minor
                Found in service_admin_week.php - About 1 hr to fix

                  Method list_attendance_stats has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function list_attendance_stats($user_id){
                  
                    $sql = "SELECT
                        events.name AS name, SUM(events.worth) AS sum_worth, events.worth AS worth
                        FROM occurrence
                  Severity: Minor
                  Found in attendance.php - About 1 hr to fix

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

                    function list_stats($hours_id, $semester) {
                      include ('mysql_access.php');
                      // Total Hours
                      $sql = "SELECT SUM(hours) AS sum_hours FROM `recorded_hours` WHERE `user_id` = $hours_id AND `semester` = '$semester' LIMIT 1";
                      $results = $db->query($sql) or die("Error Calculating Hours");
                    Severity: Minor
                    Found in check_hours.php - About 1 hr to fix

                      Method process_log has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function process_log(){
                        include('mysql_access.php');
                        if(isset($_POST['exclude'])){
                          $exclude = $_POST['exclude'];//array passed to here
                        }
                      Severity: Minor
                      Found in service_leader_functions.php - About 1 hr to fix

                        Function displayActive has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function displayActive($i){
                          include('mysql_access.php');
                        
                          $message = array("Past: ","Present: ","Cancelled: ");
                          //echo $i;
                        Severity: Minor
                        Found in service_leader_functions.php - About 1 hr 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 process_log has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function process_log(){
                          include('mysql_access.php');
                          if(isset($_POST['exclude'])){
                            $exclude = $_POST['exclude'];//array passed to here
                          }
                        Severity: Minor
                        Found in service_leader_functions.php - About 1 hr 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 process_login has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function process_login(){
                            require_once ('../mysql_access.php');
                            $email = addslashes($_POST["email"]);
                            $password = addslashes($_POST["password"]);
                            $hasher = new PasswordHash(8, true);
                        Severity: Minor
                        Found in r8conf2016/login.php - About 1 hr 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 list_stats has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function list_stats($hours_id, $semester) {
                          include ('mysql_access.php');
                          global $total_query;
                          // Total Hours
                          $sql = "SELECT SUM(hours) AS `sum_hours` FROM `recorded_hours` WHERE `user_id` = '$hours_id' AND `semester` = '$semester' LIMIT 1";
                        Severity: Minor
                        Found in service_hours.php - About 1 hr 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 42 lines of code (exceeds 25 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 1 hr to fix

                          Method displayView has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function displayView($i){
                            include('mysql_access.php');
                            $sql = "SELECT c.firstname, c.lastname, c.phone, c.email, a.drive,
                                e.name, d.DOW
                                FROM contact_information AS c
                          Severity: Minor
                          Found in service_leader_functions.php - About 1 hr to fix

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

                            function show_active() {
                                $id = $_SESSION['sessionID'];    
                                
                                include('retrieve_user.php');
                                $position = id_to_position($id);
                            Severity: Minor
                            Found in update_semester.php - About 1 hr to fix

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

                              function show_active() {
                                  //check for proper parameters
                                  if(isset($_POST['submit']))
                                  {
                                      global $current_semester;
                              Severity: Minor
                              Found in event_signup_done.php - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language