Showing 1,397 of 1,397 total issues
Method save
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function save()
{
$db = PdoFactory::getPdoInstance();
// Begin a new transaction
- Create a ticketCreate a ticket
Method resolveCode
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function resolveCode($code)
{
switch($code) {
case E_ROOMMATE_MALFORMED_USERNAME:
return "Malformed Username.";
- Create a ticketCreate a ticket
Method countNetAppsByClassGender
has 28 lines of code (exceeds 25 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
- Create a ticketCreate a ticket
Method sendRoomChangeCurrRDNotice
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sendRoomChangeCurrRDNotice(RoomChangeRequest $request)
{
$subject = 'Room Change Approval Required';
$template = 'email/roomChangeCurrRDNotice.tpl';
- Create a ticketCreate a ticket
Method execute
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
if (!isset($this->term) || is_null($this->term)) {
throw new \InvalidArgumentException('Missing term.');
}
- Create a ticketCreate a ticket
Function roleMan
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var roleMan = function(className, instance, div, name){
this.div = div;
this.roles = new Array();
this.className = className;
this.instance = instance;
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$this->setTitle($this->reportCtrl->getFriendlyName() . ' Detail');
$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 addUnsavedDamages
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
addUnsavedDamages(type, sideInput, noteInput){
var options = this.state.options
var categ = '';
var dmgTypeDesc = '';
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
$term = Term::getSelectedTerm();
$bannerId = $context->get('bannerId');
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public static function execute()
{
// Copied and pasted from index.php
require_once(PHPWS_SOURCE_DIR . 'mod/hms/inc/defines.php');
- 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 createPlan
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function createPlan(Student $student, $term, HousingApplication $application = null, ResidenceHall $hall = null)
{
if($application === null){
$planCode = MealPlan::BANNER_MEAL_STD;
} else {
- 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 getAppByStudent
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function getAppByStudent(Student $student, $term, $applicationType = NULL)
{
$db = new \PHPWS_DB('hms_new_application');
$db->addWhere('banner_id', $student->getBannerId());
$db->addWhere('term', $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 10 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
\Layout::addPageTitle("RLC Application");
javascript('jquery');
- 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 deleteRoom
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function deleteRoom($roomId)
{
if (!\Current_User::allow('hms', 'room_structure')) {
throw new PermissionException('You do not have permission to delete a room.');
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['DATES'] = HMS_Util::getPrettyDateRange($this->startDate, $this->endDate);
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['DATES'] = HMS_Util::getPrettyDateRange($this->startDate, $this->endDate);
- 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 addResponsible
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function addResponsible($residents)
{
$respNames = array();
foreach ($residents as $r) {
$respNames[$r['studentId']] = $r['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
Function execute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
if (!isset($this->term) || is_null($this->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 SourceMapConsumer_originalPositionFor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SourceMapConsumer_originalPositionFor(aArgs) {
var needle = {
generatedLine: util.getArg(aArgs, 'line'),
generatedColumn: util.getArg(aArgs, 'column')
};
- Create a ticketCreate a ticket
Function b64ToByteArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b64ToByteArray (b64) {
var i, j, l, tmp, placeHolders, arr
if (b64.length % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
- Create a ticketCreate a ticket