Showing 1,397 of 1,397 total issues
Function indexOf
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
else if (byteOffset < -0x80000000) byteOffset = -0x80000000
byteOffset >>= 0
- Create a ticketCreate a ticket
Function collectRegex
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function collectRegex() {
var pos, loc, regex, token;
skipComment();
- Create a ticketCreate a ticket
Function parseDeclareFunction
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseDeclareFunction() {
var id, idMarker,
marker = markerCreate(), params, returnType, rest, tmp,
typeParameters = null, value, valueMarker;
- Create a ticketCreate a ticket
Method show
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
javascript('jquery');
javascript('jquery_ui');
javascript('select2');
- Create a ticketCreate a ticket
Method show
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
javascript('jquery');
javascript('jquery_ui');
javascript('select2');
- Create a ticketCreate a ticket
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
render(){
var backUrl = "index.php?module=hms&action=ShowSearchByRlc"
var addMembersUrl = "index.php?module=hms&action=ShowAdminAddRlcMember&communityId=" + this.props.rlcId;
var exportUrl = "index.php?module=hms&action=CreateCsvByRlc&id=" + this.props.rlcId
- Create a ticketCreate a ticket
Method show
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['TERM'] = Term::toString($this->term) . ' - ' . Term::toString(Term::getNextTerm($this->term));
- Create a ticketCreate a ticket
Method getAddress
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAddress($type = null)
{
$pr_address = null;
$ps_address = null;
- Create a ticketCreate a ticket
Method sendRoomChangeCancelledNotice
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sendRoomChangeCancelledNotice(RoomChangeRequest $r, Student $canceller = null)
{
$subject = 'Room Change Cancelled';
$template = 'email/roomChangeCancelledNotice.tpl';
- Create a ticketCreate a ticket
Method getMembership
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getMembership($permission=null, $object=null, $username=null, $display_name=false){
$db = self::getDb();
$db->addJoin('left outer', 'hms_permission', 'hms_role_perm', 'id', 'permission');
$db->addJoin('left outer', 'hms_role_perm', 'hms_role', 'role', 'id');
$db->addJoin('left outer', 'hms_role', 'hms_user_role', 'id', 'role');
- Create a ticketCreate a ticket
Method count_beds_per_room
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function count_beds_per_room()
{
$total = array(); // stores the number of rooms with that many beds
$db = PdoFactory::getPdoInstance();
- Create a ticketCreate a ticket
Method count_avail_lottery_rooms
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function count_avail_lottery_rooms($gender, $rlcId = null)
{
$now = time();
$db = PdoFactory::getPdoInstance();
- Create a ticketCreate a ticket
Method assign
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function assign(AssignmentPairing $pair, Room $room)
{
if(!$this->allowed($pair, $room)) {
throw new AssignmentException('Cannot assign ' . $pair->__tostring() . ' to ' . $room->__tostring());
}
- Create a ticketCreate a ticket
Function createFunctionExpression
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
createFunctionExpression: function (id, params, defaults, body, rest, generator, expression,
isAsync, returnType, typeParameters) {
- Create a ticketCreate a ticket
Function createFunctionDeclaration
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression,
isAsync, returnType, typeParameters) {
- Create a ticketCreate a ticket
Function execute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
$term = $context->get('term');
$student = StudentFactory::getStudentByUsername(UserStatus::getUsername(), $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 execute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if(!\Current_User::allow('hms', 'cancel_housing_application')){
throw new PermissionException('You do not have permission to cancel housing applications.');
}
- 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 doPairing
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function doPairing(&$applications, &$pairs)
{
$keys = $this->sort($applications);
while(count($applications) > 1) {
- 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(CommandContext $context)
{
$term = $context->get('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 countGrossApplicationsByClassGender
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function countGrossApplicationsByClassGender($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"