Showing 379 of 6,675 total issues
Method create_autocomplete_query
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function create_autocomplete_query($row)
{
extract($row);
$lfirst = strtolower($first_name);
- Create a ticketCreate a ticket
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var fgClasses = classNames({
'form-group': true,
'has-error': this.state.hasError
});
- Create a ticketCreate a ticket
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var fgClasses = classNames({
'form-group': true,
'has-error': this.state.hasError
});
- Create a ticketCreate a ticket
Function render
has 36 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 HostData = null;
if (this.state.hostDisplayData != null) {
- Create a ticketCreate a ticket
Function getData
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData() {
$.ajax({
url: 'index.php?module=intern&action=HostRest',
type: 'GET',
dataType: 'json',
- Create a ticketCreate a ticket
Method post
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function post() {
$Main = $_REQUEST['main'];
$Name = $_REQUEST['name'];
$Address = $_REQUEST['address'];
$City = $_REQUEST['city'];
- Create a ticketCreate a ticket
Method showWarnings
has 36 lines of code (exceeds 25 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
- Create a ticketCreate a ticket
Function onAdminCreate
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
onAdminCreate(username, department)
{
//var displayName = '';
var displayData = this.state.displayData;
var dept = this.state.deptData;
- 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 getTotalRows
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getTotalRows()
{
/**
* if total_column is set, use it to get total 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 addToggleFunction
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function addToggleFunction($function, $toggle=2)
{
if (empty($function) || $toggle < 2) {
return false;
}
- 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 getMajors
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getMajors($term): AcademicMajorList
{
if($term === null || $term == '') {
throw new \InvalidArgumentException('Missing term.');
}
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
protected function buildMessage()
{
$this->to = explode(',', $this->emailSettings->getBackgroundCheckEmail());
$host = $this->internship->getHost();
- 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 copyAddress
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function copyAddress(){
//copy from Host Details to Supervisor Info
function doCopySupervisor(){
$("#internship_supervisor_address").val($("#internship_host_address").text());
- Create a ticketCreate a ticket
Method joinResult
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function joinResult($source_column, $join_table, $join_column, $content_column, $new_name=null, $searchable=false)
{
// TODO: this will break if you have more than one db pager at a time
// TODO: make this a private member variable
static $join_match = null;
- Create a ticketCreate a ticket
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($id, $username, $firstName, $lastName, $phone, $fax, $streetAddress1, $streetAddress2, $city, $state, $zip)
- Create a ticketCreate a ticket
Function handleSave
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleSave() {
this.setState({editMode: false});
var newStype = ReactDOM.findDOMNode(this.refs.savedStype).value.trim();
var newDescr = ReactDOM.findDOMNode(this.refs.savedDescr).value.trim();
- Create a ticketCreate a ticket
Function sortBy
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
sortBy(unsorted, typeOfSort) {
var sorted = [];
switch(typeOfSort) {
case 'subA':
sorted = unsorted.sort(function (a, b) {
- Create a ticketCreate a ticket
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render(){
let list
let DropZone = <div></div>
// If there is a file uploaded it shows the file, else it shows dropzone so you can upload one
if (this.state.currentFiles.length > 0) {
- Create a ticketCreate a ticket
Method execute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
// Load the existing internship using its ID
$internship = InternshipFactory::getInternshipById($_REQUEST['internshipId']);
// Load the emergency contacts from the old internship
- Create a ticketCreate a ticket
Method execute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
/* Check if user should have access to folders */
if (!\Current_User::isLogged()) {
\NQ::simple('intern', \Intern\UI\NotifyUI::WARNING,
- Create a ticketCreate a ticket