Showing 1,397 of 1,397 total issues
Function execute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if (!UserStatus::isAdmin() || !\Current_User::allow('hms', 'assignment_maintenance')) {
throw new PermissionException('You do not have permission to assign students.');
}
- 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 countNetAppsByClassGender
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function countNetAppsByClassGender($term, $class = null, $gender = null)
{
$term_year = Term::getTermYear($term);
$query = "SELECT count(*) from hms_new_application JOIN hms_lottery_application ON hms_new_application.id = hms_lottery_application.id
- 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 applicantsReport
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function applicantsReport()
{
$term = Term::getSelectedTerm();
$rlc_list = HMS_Learning_Community::getRlcList();
- 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 addBed
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function addBed($roomId, $term, $bedLetter, $bedroomLabel, $phoneNumber, $bannerId, $raRoommate, $intlReserved, $raBed, $persistentId)
- Create a ticketCreate a ticket
Function show
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
if (!UserStatus::isAdmin() || !\Current_User::allow('hms', 'bed_view')) {
throw new PermissionException('You are not allowed to edit or view beds.');
}
- 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 getAllFreshmenApplications
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getAllFreshmenApplications($term)
{
$sem = Term::getTermSem($term);
$db = new PHPWS_DB('hms_new_application');
- 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 send_email
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function send_email($to, $from, $subject, $content, $cc = NULL, $bcc = NULL)
{
// Sanity checking
if(!isset($to) || is_null($to)){
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 show
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['TERM'] = Term::toString($this->room->getTerm());
- 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 __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
// Check permissions
- 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 a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function render()
{
parent::render();
$this->tpl['TERM'] = Term::toString($this->report->getTerm());
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$halls = ResidenceHall::get_halls($this->term);
$rows = 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 toString
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Buffer.prototype.toString = function toString (encoding, start, end) {
var loweredCase = false
start = start >>> 0
end = end === undefined || end === Infinity ? this.length : end >>> 0
- Create a ticketCreate a ticket
Function parseProgramElements
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseProgramElements() {
var sourceElement, sourceElements = [], token, directive, firstRestricted;
while (index < length) {
token = lookahead;
- Create a ticketCreate a ticket
Function 15
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"amdefine":20}],15:[function(_dereq_,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
- Create a ticketCreate a ticket
Method processArgs
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processArgs($argc, $argv, &$args, &$switches)
{
if($argc < count(array_keys($args)) + 1) {
echo "USAGE: php {$argv[0]}";
- Create a ticketCreate a ticket
Method dsn_array
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dsn_array()
{
static $dsn_array = null;
if (!empty($dsn_array)) {
- Create a ticketCreate a ticket
Method rlcApplicationPager
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rlcApplicationPager()
{
$submitCmd = CommandFactory::getCommand('AssignRlcApplicants');
$form = new \PHPWS_Form;
$submitCmd->initForm($form);
- Create a ticketCreate a ticket
Method get_row
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_row($application_term)
{
$first_name = first_name();
$middle_name = middle_name($first_name);
$last_name = last_name();
- Create a ticketCreate a ticket
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
// Make sure we have a valid term
$term = $context->get('term');
- Create a ticketCreate a ticket
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if(!UserStatus::isUser()) {
throw new PermissionException('You do not have permission to request a roommate.');
}
- Create a ticketCreate a ticket