Showing 1,397 of 1,397 total issues
Function execute
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context){
$term = Term::getCurrentTerm();
// Get the list of role memberships this user has
- 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 20 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if( !\Current_User::allow('hms', 'room_attributes') ){
throw new PermissionException('You do not have permission to edit rooms.');
}
- 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 20 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
if (empty($this->housingApps)) {
- 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 20 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$floor = new Floor($this->floorId);
$tpl = 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 copy
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function copy($to_term, $room_id, $assignments)
{
if (!$this->id) {
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 20 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$assignment = HMS_Assignment::getAssignmentByBannerId($this->student->getBannerId(), $this->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 autoassign
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function autoassign()
{
echo "Apps: " . count($this->applications) . "\n";
echo "Pairs: " . count($this->pairs) . "\n";
- 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 increment
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function increment()
{
if($this->bedtime < 2) {
$this->bedtime = 2;
- 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 20 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['ENTRY_TERM'] = Term::toString($this->student->getApplicationTerm());
- 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 20 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$submitCmd = CommandFactory::getCommand('LotteryConfirm');
- 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 removeOption
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.removeOption = function()
{
var a = arguments;
if(a.length == 0) return this;
var ta = typeof(a[0]);
- Create a ticketCreate a ticket
Function parseMethodDefinition
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseMethodDefinition(key, isStatic, generator, computed) {
var token, param, propType,
isAsync, typeParameters, tokenValue, returnType;
propType = isStatic ? ClassPropertyType["static"] : ClassPropertyType.prototype;
- Create a ticketCreate a ticket
Method execute
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
// TODO Use the HousingApplicationFactory class to get all this data
$term = $context->get('term');
- Create a ticketCreate a ticket
Method show
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$_SESSION['profile_search_use_session'] = FALSE;
require_once(PHPWS_SOURCE_DIR . 'mod/hms/inc/profile_options.php');
- Create a ticketCreate a ticket
Function parseFunctionDeclaration
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseFunctionDeclaration() {
var id, body, token, tmp, firstRestricted, message, generator, isAsync,
previousStrict, previousYieldAllowed, previousAwaitAllowed,
marker = markerCreate(), typeParameters;
- Create a ticketCreate a ticket
Method execute
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if( !\Current_User::allow('hms', 'room_attributes') ){
throw new PermissionException('You do not have permission to edit rooms.');
}
- Create a ticketCreate a ticket
Method execute
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context){
$currentTerm = Term::getCurrentTerm();
$username = UserStatus::getUsername();
# Create a contact form command, redirect to it in case of error.
- Create a ticketCreate a ticket
Method show
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
javascript('jquery');
javascript('jquery_ui');
- Create a ticketCreate a ticket
Method render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function render()
{
parent::render();
$this->tpl['TERM'] = Term::toString($this->report->getTerm());
- Create a ticketCreate a ticket
LotteryApplication
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class LotteryApplication extends HousingApplication {
public $magic_winner = 0;
public $invited_on = NULL;
- Create a ticketCreate a ticket