Showing 167 of 11,898 total issues
Function grade_quiz
has a Cognitive Complexity of 124 (exceeds 5 allowed). Consider refactoring. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- 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
File attendance_admin.php
has 926 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once ('session.php');
require_once ('mysql_access.php');
?>
<!doctype html>
Function displayListing
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- 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 grade_quiz
has 315 lines of code (exceeds 25 allowed). Consider refactoring. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
Method display_log_form
has 294 lines of code (exceeds 25 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
Method displayListing
has 292 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayListing(){
include('mysql_access.php');
$dateMapNew = array(1,0,6,5,4,3,2);
$dateMap1 = array(0,6,5,4,3,2,1);
$currentDOW1 = date('w');//returns integer of DOW
Method process_add
has 288 lines of code (exceeds 25 allowed). Consider refactoring. Open
function process_add(){//A.K.A. FUNCTION BITCH()
$name = $_POST['name'];
$day = $_POST['day'];
$year = $_POST['year'];
$month = $_POST['month'];
Method show_page
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
function show_page() {
include('mysql_access.php');
global $current_semester;
if (isset($_POST['update'])) {
Method show_active
has 255 lines of code (exceeds 25 allowed). Consider refactoring. Open
function show_active(){
//Start loading external resources
?>
<script src='/js/foundation/foundation.js'></script>
<script src='/js/foundation/foundation.reveal.js'></script>
Method display
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
function display($event_type) {
include('mysql_access.php');
$user_id = $_SESSION['sessionID'];
$response=$db->query("SELECT MAX(event_id) FROM events_listing");
$result=mysqli_fetch_array($response);
Function displayListing
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
function displayListing(){
include('mysql_access.php');
$dateMapNew = array(1,0,6,5,4,3,2);
$dateMap1 = array(0,6,5,4,3,2,1);
$currentDOW1 = date('w');//returns integer of DOW
- 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 54 (exceeds 5 allowed). Consider refactoring. Open
function show_active() {
echo "<h1>Events you are leading:</h1>";
$user_id = $_SESSION['sessionID'];
include('mysql_access.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
Function display
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
function display($group) {
if($group == 'All (sorted)')
{
echo '<h2>Active Members</h2>';
display_active_members();
- 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 displayListing
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
Function display
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
function display($event_type) {
include('mysql_access.php');
$user_id = $_SESSION['sessionID'];
echo "Displaying " . $event_type . " Events";
- 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_page
has 186 lines of code (exceeds 25 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>
Function display_event_table
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function display_event_table($rtype)
{
include('mysql_access.php');
$user_id = $_SESSION['sessionID'];
//get events for the user
- 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_form
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
function show_form() {
if(isset($result)) {
echo $result;
}
$month_no = date('n');
File risk_management_quiz.php
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once ('session.php');
require_once ('mysql_access.php');
?>
<!doctype html>
Function show_active
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function show_active() {
include('mysql_access.php');
$position = $_SESSION['sessionposition'];
echo $position;
- 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"