Showing 1,397 of 1,397 total issues
Function execute
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
$term = $context->get('term');
$errorCmd = CommandFactory::getCommand('ShowHousingApplicationForm');
- 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 errorFree
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
errorFree() {
var all_clear = true;
var errors = [];
let resident_selected = 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 execute
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
// Get input
$requestId = $context->get('requestId');
- 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 toString
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function toString($term, $concat = true)
{
$result = array();
// Grab the year from the entry_term
$result['year'] = Term::getTermYear($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 show
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function show(){
\Layout::addPageTitle("RLC Application Review");
$tags = array();
- 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 execute
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$term = $this->term;
$sem = Term::getTermSem($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 parseParam
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseParam(options) {
var marker, token, rest, param, def;
token = lookahead;
if (token.value === '...') {
- Create a ticketCreate a ticket
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if(!UserStatus::isAdmin() || !\Current_User::allow('hms', 'floor_attributes') ){
throw new PermissionException('You do not have permission to edit floors.');
}
- Create a ticketCreate a ticket
Method show
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['TERM'] = Term::toString($this->room->getTerm());
- Create a ticketCreate a ticket
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
$db = PdoFactory::getPdoInstance();
$query = "SELECT hms_assignment.banner_id, hms_hall_structure.room_number, hms_hall_structure.hall_name
- Create a ticketCreate a ticket
File HMS_Learning_Community.php
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Homestead;
use \Homestead\Exception\DatabaseException;
- Create a ticketCreate a ticket
File RoomDamages.jsx
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
class RoomDamagesBox extends React.Component{
- Create a ticketCreate a ticket
Function reinterpretAsCoverFormalsList
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function reinterpretAsCoverFormalsList(expressions) {
var i, len, param, params, defaults, defaultCount, options, rest;
params = [];
defaults = [];
- Create a ticketCreate a ticket
Function roleMan
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
var roleMan = function(className, instance, div, name){
this.div = div;
this.roles = new Array();
this.className = className;
this.instance = instance;
- Create a ticketCreate a ticket
Method send_emails
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function send_emails()
{
if(empty($_REQUEST['subject'])){
return Notification::show_edit_email('You must fill in the subject line of the email.', '', $_REQUEST['body']);
} else if(empty($_REQUEST['body'])){
- Create a ticketCreate a ticket
Method execute
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if (!UserStatus::isAdmin() || !\Current_User::allow('hms', 'hall_attributes') ) {
throw new PermissionException('You do not have permission to edit halls.');
}
- Create a ticketCreate a ticket
Method show
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$roommate = HMS_Roommate::get_confirmed_roommate(UserStatus::getUsername(), $this->term);
- Create a ticketCreate a ticket
Method execute
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
$db = PdoFactory::getPdoInstance();
$query = 'SELECT hms_new_application.username, hms_new_application.banner_id, hms_lottery_application.early_release FROM hms_new_application JOIN hms_lottery_application ON hms_new_application.id = hms_lottery_application.id WHERE (hms_new_application.term = :term AND hms_lottery_application.early_release IS NOT NULL) ORDER BY hms_lottery_application.early_release ASC, hms_new_application.username ASC';
- Create a ticketCreate a ticket
Function parseSourceElement
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseSourceElement() {
var token;
if (lookahead.type === Token.Keyword) {
switch (lookahead.value) {
case 'const':
- Create a ticketCreate a ticket
Method execute
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context){
if(!\Current_User::allow('hms', 'learning_community_maintenance')) {
throw new PermissionException('You do not have permission to edit learning communities.');
}
- Create a ticketCreate a ticket