Showing 379 of 6,675 total issues
Method post
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function post() {
$code = $_REQUEST['code'];
$census = $_REQUEST['census'];
$descr = $_REQUEST['descr'];
$available = $_REQUEST['available'];
- Create a ticketCreate a ticket
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
// Create red asterisk for a required field
var require = <span style={{color: '#FB0000'}}> *</span>;
var loc = null;
if(this.state.domestic === true){
- Create a ticketCreate a ticket
Function onTermCreate
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
onTermCreate(tcode, stype, descr, census, available, start, end, ugradOver, gradOver) {
var errorMessage = null;
if (tcode === '' || tcode.length !== 6) {
- Create a ticketCreate a ticket
Method getPager
has 21 arguments (exceeds 4 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,
- Create a ticketCreate a ticket
Function showWarnings
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private function showWarnings() {
// Get state of documents or affiliation
$conAffil = DocumentRest::contractAffilationSelected($this->intern->getId());
// Show warning if no documents uploaded or affiliation agreement selected but workflow state suggests there should be
- 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 process
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function process($arguments)
{
$dump_data = false;
array_shift($arguments);
- 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 buildMessage
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function buildMessage()
{
$subjects = Subject::getSubjects();
$faculty = $this->internship->getFaculty();
- Create a ticketCreate a ticket
Function validate
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
validate(form, thisComponent) {
// Assume everything is valid, change this if we detect otherwise
var valid = true;
var errors = [];
- Create a ticketCreate a ticket
Method getSortButtons
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSortButtons(&$template)
{
if (empty($this->table_columns)) {
return null;
}
- Create a ticketCreate a ticket
Method buildMessage
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function buildMessage()
{
$this->subject = 'Internship Enrollment Issue';
$this->to[] = $this->internship->email . $this->emailSettings->getEmailDomain();
- Create a ticketCreate a ticket
File DocumentRest.php
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Intern\Command;
use \phpws2\Database;
- Create a ticketCreate a ticket
AllHostList
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class AllHostList extends React.Component {
constructor(props) {
super(props);
this.state = {
- Create a ticketCreate a ticket
Method put
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function put() {
$postarray = json_decode(file_get_contents('php://input'));
$Id = $postarray->id;
$db = Database::newDB();
- Create a ticketCreate a ticket
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
render(){
return (
<div className="row">
<div className="col-md-offset-1 col-md-10">
- Create a ticketCreate a ticket
Function buildMessage
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function buildMessage()
{
$subjects = Subject::getSubjects();
$faculty = $this->internship->getFaculty();
- 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 createReport
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function createReport()
{
if ($this->class) {
$methods = get_class_methods($this->class);
if (in_array($this->report_row, $methods)) {
- 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 getPageRows
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPageRows()
{
$template = null;
$count = 0;
- Create a ticketCreate a ticket
Method get
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get($return_blank_results=true)
{
$template = array();
if (empty($this->display_rows)) {
- Create a ticketCreate a ticket
Supervisor
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Supervisor implements DbStorable {
public $id;
public $host_id;
public $supervisor_first_name;
- Create a ticketCreate a ticket
Function componentDidMount
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentDidMount() {
var searchSuggestions = new Bloodhound({
datumTokenizer: function(datum){
var nameTokens = Bloodhound.tokenizers.obj.whitespace('name');
- Create a ticketCreate a ticket