Showing 11,898 of 11,898 total issues
Method backup_tables
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function backup_tables($tables = '*')
{
include('mysql_access.php');
//get all of the tables
if($tables == '*')
Function exports
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
sass: {
Function exports
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
sass: {
Function processAttendance
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function processAttendance($d,$o){
include('mysql_access.php');
echo "<h1>Process Attendance</h1>";
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
- 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 process_form
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function process_form() {
include ('mysql_access.php');
$id = $_SESSION['sessionID'];
$event = $_POST['event'];
$month = $_POST['month'];
Function hide
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hide : function (el, css) {
// is modal
if (css) {
var settings = el.data(this.attr_name(true) + '-init');
var animData = getAnimationData(settings.animation);
Function data_options
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data_options : function (el) {
var opts = {}, ii, p, opts_arr,
data_options = function (el) {
var namespace = Foundation.global.namespace;
Method show_active
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function show_active() {
?>
<h1> Event Creation Home </h1>
<?php
include('mysql_access.php');
Method processNewWeek
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processNewWeek(){
include('mysql_access.php');
$date = $_POST['date'];
$detail_ids = $_POST['detail_ids'];
$exclude = $_POST['exclude'];
Method show_active
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
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");
Function display_log_form
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
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
- 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 process_form
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function process_form() {
include ('mysql_access.php');
if ($_POST['action'] == "Reset Vars") {
if (isset($_SESSION['sessionIDOriginal'])) {
$sessionIDOriginal = $_SESSION['sessionIDOriginal'];
Method eventDetailsForm
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function eventDetailsForm(){
include('mysql_access.php');
echo "<h2>Add Event Details</h2>";
echo<<<FORM
Method show_active
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function show_active() {
include('mysql_access.php');
include('retrieve_user.php');
$user_id = $_SESSION['sessionID'];
Method crypt_private
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function crypt_private($password, $setting)
{
$output = '*0';
if (substr($setting, 0, 2) == $output)
$output = '*1';
Method list_exec_by_page
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Method show_quiz
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
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>
Method displayProjectList
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayProjectList(){
include('mysql_access.php');
echo "<h2>Project Leaders</h2>";
Method show_info
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function show_info($access) {
require_once("../get_photo.php");
$user_id = $_GET['user_id'];
$photolink = getPhotoLink($user_id);
include("../mysql_access.php");
Method show_active
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);