Showing 379 of 6,675 total issues
File SubselectDatabase.php
has 1892 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
* Internship Inventory is free software: you can redistribute it and/or modify
- Create a ticketCreate a ticket
File ApproveHost.jsx
has 993 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import {Button, Modal} from 'react-bootstrap';
import Message from '../emergencyContact/Message.jsx';
- Create a ticketCreate a ticket
File SubselectPager.php
has 982 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
* Internship Inventory is free software: you can redistribute it and/or modify
- Create a ticketCreate a ticket
File createFakeStudents.php
has 892 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/php
<?php
/**
* This file is part of Internship Inventory.
*
- Create a ticketCreate a ticket
SubselectDatabase
has 105 functions (exceeds 20 allowed). Consider refactoring. Open
class SubselectDatabase extends PHPWS_DB{
public function __construct($table = null)
{
parent::__construct($table);
- Create a ticketCreate a ticket
Internship
has 87 functions (exceeds 20 allowed). Consider refactoring. Open
class Internship {
const GPA_MINIMUM = 2.00;
public $id;
- Create a ticketCreate a ticket
Function execute
has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
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 Internship.php
has 624 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
* Internship Inventory is free software: you can redistribute it and/or modify
- Create a ticketCreate a ticket
Method handleRequest
has 274 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleRequest()
{
// Check if it is time to add more term. If so, show a warning to admins.
$futureTerms = TermFactory::getFutureTermsAssoc();
if(sizeof($futureTerms) < 3 && \Current_User::isDeity()){
- Create a ticketCreate a ticket
Function handleRequest
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
public function handleRequest()
{
// Check if it is time to add more term. If so, show a warning to admins.
$futureTerms = TermFactory::getFutureTermsAssoc();
if(sizeof($futureTerms) < 3 && \Current_User::isDeity()){
- Read upRead up
- Create a ticketCreate a ticket
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 getPageLinks
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function getPageLinks()
{
if ($this->total_pages < 1) {
$current_page = $total_pages = 1;
} else {
- Read upRead up
- Create a ticketCreate a ticket
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 execute
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Create a ticketCreate a ticket
File EditTerms.jsx
has 554 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import Calendar from 'react-calendar';
import 'react-calendar/dist/Calendar.css';
- Create a ticketCreate a ticket
Function addWhere
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
public function addWhere($column, $value = null, $operator = null, $conj = null, $group = null, $join = false)
{
PHPWS_DB::touchDB();
$where = new PHPWS_DB_Where;
- Read upRead up
- Create a ticketCreate a ticket
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 getPageRows
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
public function getPageRows()
{
$template = null;
$count = 0;
- Read upRead up
- Create a ticketCreate a ticket
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 buildInternshipForm
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
public function buildInternshipForm() {
javascript('jquery');
javascript('jquery_ui');
// Form Submission setup, only allowed to save if you have permission
- Read upRead up
- Create a ticketCreate a ticket
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 buildInternshipForm
has 226 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildInternshipForm() {
javascript('jquery');
javascript('jquery_ui');
// Form Submission setup, only allowed to save if you have permission
- Create a ticketCreate a ticket
Function getColumn
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function getColumn($format = false)
{
if ($format) {
if (empty($this->columns)) {
//return $this->tables[0] . '.*';
- Read upRead up
- Create a ticketCreate a ticket
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 getPager
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
private static function getPager($name = null, $deptId = null, $term = null,
$ugradMajor = null, $gradProg = null, $level = null, $type = null,
$campus = null, $loc = null, $state = null, $country = null,
$workflowState = null, $courseSubject = null, $courseNum = null,
$courseSect = null, $oied = null, $faculty = null,
- Read upRead up
- Create a ticketCreate a ticket
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 FacultyEdit.jsx
has 515 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import '../custom.css'
import {Button, Modal} from 'react-bootstrap';
- Create a ticketCreate a ticket