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');
?>
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>
- Read upRead up
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'];
- Read upRead up
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;";
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'];
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";
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');
?>
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';";
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.
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 = [];
- Read upRead up
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;
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
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");
- Read upRead up
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');
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
- Read upRead up
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'>
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',
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");
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";
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>