Showing 379 of 6,675 total issues
Function render
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var ApproveData = null;
if (this.state.approveData != null && this.state.hostData != null && this.state.conditionData != null) {
ApproveData = this.state.approveData.map(function (host) {
return (
- Create a ticketCreate a ticket
SubselectPager
has 55 functions (exceeds 20 allowed). Consider refactoring. Open
class SubselectPager extends \DBPager {
public function __construct($table, $class=null)
{
parent::__construct($table, $class);
- Create a ticketCreate a ticket
File EditInternshipFormView.php
has 459 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 first_name
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
function first_name()
{
static $first_names = array(
'Abigail',
'Abigail',
- Create a ticketCreate a ticket
Function initialize
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function initialize($load_rows=true)
{
$order_set = false;
$this->table_columns = $this->db->getTableColumns();
- 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 buildMessage
has a Cognitive Complexity of 41 (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
Method last_name
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
function last_name()
{
static $last_names = array(
'Acula',
'Achenbach',
- Create a ticketCreate a ticket
Function plugStudent
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private function plugStudent() {
// Student
$this->tpl['BANNER'] = $this->intern->getBannerId();
$this->tpl['STUDENT_FIRST_NAME'] = $this->intern->getFirstName();
$this->tpl['STUDENT_MIDDLE_NAME'] = $this->intern->middle_name;
- 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 getPager
has 144 lines of code (exceeds 25 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
File AffiliateList.jsx
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import {CSSTransition} from 'react-transition-group'
import classNames from 'classnames';
- Create a ticketCreate a ticket
Function initFacultySelector
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initFacultySelector()
{
/********************
* Faculty Selection
*/
- Create a ticketCreate a ticket
Method intern_update
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
function intern_update(&$content, $currentVersion)
{
PHPWS_Core::initModClass('users', 'Permission.php');
switch ($currentVersion) {
- Create a ticketCreate a ticket
Method generatePdf
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function generatePdf()
{
$this->pdf = new \setasign\Fpdi\Fpdi('P', 'mm', 'Letter');
$h = $this->internship->getHost();
$s = $this->internship->getSupervisor();
- Create a ticketCreate a ticket
File HostBlock.jsx
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import classNames from 'classnames';
import {Button, Modal} from 'react-bootstrap';
import LocationBlock from './LocationBlock.jsx';
import Message from '../emergencyContact/Message.jsx';
- Create a ticketCreate a ticket
Function get
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function get($return_blank_results=true)
{
$template = array();
if (empty($this->display_rows)) {
- 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 render
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var AffiliateData = null;
if (this.state.mainData != null) {
AffiliateData = this.state.displayData.map(function (affil) {
- Create a ticketCreate a ticket
Method getPageLinks
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPageLinks()
{
if ($this->total_pages < 1) {
$current_page = $total_pages = 1;
} else {
- Create a ticketCreate a ticket
Function initFacultySelector
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
function initFacultySelector()
{
/********************
* Faculty Selection
*/
- 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 initialize
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initialize($load_rows=true)
{
$order_set = false;
$this->table_columns = $this->db->getTableColumns();
- Create a ticketCreate a ticket
Method pullTables
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function pullTables($sql)
{
$sql = preg_replace('/ {2,}/', ' ', trim($sql));
$sql = preg_replace('/[\n\r]/', ' ', $sql);
$command = substr($sql, 0, strpos($sql, ' '));
- Create a ticketCreate a ticket