APO-Epsilon/apo-website

View on GitHub

Showing 11,898 of 11,898 total issues

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

function backup_tables($tables = '*')
{
  include('mysql_access.php');
  //get all of the tables
  if($tables == '*')
Severity: Minor
Found in backup.php - About 1 hr to fix

    Function exports has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function(grunt) {
      grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        watch: {
          sass: {
    Severity: Minor
    Found in r8conf2016/sass/Gruntfile.js - About 1 hr to fix

      Function exports has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(grunt) {
        grunt.initConfig({
          pkg: grunt.file.readJSON('package.json'),
          watch: {
            sass: {
      Severity: Minor
      Found in sass/Gruntfile.js - About 1 hr to fix

        Function processAttendance has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        function processAttendance($d,$o){
          include('mysql_access.php');
          echo "<h1>Process Attendance</h1>";
          echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
        
        
        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

        Method process_form has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function process_form() {
          include ('mysql_access.php');
          $id = $_SESSION['sessionID'];
          $event = $_POST['event'];
          $month = $_POST['month'];
        Severity: Minor
        Found in service_hours.php - About 1 hr to fix

          Function hide has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              hide : function (el, css) {
                // is modal
                if (css) {
                  var settings = el.data(this.attr_name(true) + '-init');
                  var animData = getAnimationData(settings.animation);
          Severity: Minor
          Found in r8conf2016/js/foundation/foundation.reveal.js - About 1 hr to fix

            Function data_options has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  data_options : function (el) {
                    var opts = {}, ii, p, opts_arr,
                        data_options = function (el) {
                          var namespace = Foundation.global.namespace;
            
            
            Severity: Minor
            Found in r8conf2016/js/foundation/foundation.js - About 1 hr to fix

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

              function show_active() {
                  ?>
                  <h1> Event Creation Home </h1>
                      <?php
                  include('mysql_access.php');
              Severity: Minor
              Found in create_event.php - About 1 hr to fix

                Method processNewWeek has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function processNewWeek(){
                  include('mysql_access.php');
                  $date = $_POST['date'];
                  $detail_ids = $_POST['detail_ids'];
                  $exclude = $_POST['exclude'];
                Severity: Minor
                Found in service_admin_week_setup.php - About 1 hr to fix

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

                  function show_active() {
                      if (passed_quiz()) {
                        $user_id = $_SESSION['sessionID'];
                        include('mysql_access.php');
                        $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
                  Severity: Minor
                  Found in risk_management_quiz.php - About 1 hr to fix

                    Function display_log_form has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function display_log_form(){
                    
                        $id = $_POST['event'];//WORKS
                        $sql = "SELECT events.name AS name, occurrence.date AS date, occurrence.id AS id
                                FROM events
                    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 process_form has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function process_form() {
                      include ('mysql_access.php');
                      if ($_POST['action'] == "Reset Vars") {
                        if (isset($_SESSION['sessionIDOriginal'])) {
                          $sessionIDOriginal = $_SESSION['sessionIDOriginal'];
                    Severity: Minor
                    Found in change_session_vars.php - About 1 hr to fix

                      Method eventDetailsForm has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function eventDetailsForm(){
                        include('mysql_access.php');
                        echo "<h2>Add Event Details</h2>";
                      
                      echo<<<FORM
                      Severity: Minor
                      Found in service_admin_forms.php - About 1 hr to fix

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

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

                          Method crypt_private has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function crypt_private($password, $setting)
                          {
                            $output = '*0';
                            if (substr($setting, 0, 2) == $output)
                              $output = '*1';
                          Severity: Minor
                          Found in PasswordHash.php - About 1 hr to fix

                            Method list_exec_by_page has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function list_exec_by_page() {
                                include('mysql_access.php');
                                if(isset($_GET['remove'])) {
                                    $sql = "SELECT position_id FROM positions WHERE position=\"{$_GET['remove']}\";";
                                    $result = $db->query($sql);
                            Severity: Minor
                            Found in exec_permissions.php - About 1 hr to fix

                              Method show_quiz has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function show_quiz() {
                                  include('mysql_access.php');
                                  //display the actual quiz, pick 20 random questions from the 30 in the database
                                  $response=$db->query("SELECT * FROM questions ORDER BY rand() LIMIT 20");?>
                                  <br>
                              Severity: Minor
                              Found in risk_management_quiz.php - About 1 hr to fix

                                Method displayProjectList has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function displayProjectList(){
                                  include('mysql_access.php');
                                  echo "<h2>Project Leaders</h2>";
                                
                                
                                
                                Severity: Minor
                                Found in service_admin_functions.php - About 1 hr to fix

                                  Method show_info has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function show_info($access) {
                                    require_once("../get_photo.php");
                                    $user_id = $_GET['user_id'];
                                    $photolink = getPhotoLink($user_id);
                                    include("../mysql_access.php");
                                  Severity: Minor
                                  Found in includes/family_tree_info.php - About 1 hr to fix

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

                                    function show_active() {
                                          $user_id = $_SESSION['sessionID'];
                                          include('mysql_access.php');
                                          $response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
                                          $result=mysqli_fetch_array($response);
                                    Severity: Minor
                                    Found in membership.php - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language