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
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'];
- 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 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);
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);
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");
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,
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);
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;
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
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
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");
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
}
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;
- 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 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
}
- 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 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);
- 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 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";
- 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 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function show_active() {
include('../mysql_access.php');
$big_array = [];
$little_array = [];
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
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);
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;