Showing 1,397 of 1,397 total issues
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
$term = Term::getCurrentTerm();
$gender = $context->get('gender');
- Create a ticketCreate a ticket
Method student_type
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function student_type($student_level)
{
if ($student_level == 'G') {
return 'G';
}
- Create a ticketCreate a ticket
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
// Check permissions
if(!\Current_User::allow('hms', 'special_interest_approval')){
throw new PermissionException('You do not have permission to approve special interest group requests.');
- Create a ticketCreate a ticket
Method count_assignments_by_class
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function count_assignments_by_class($term, $class)
{
$term_year = Term::getTermYear($term);
$query = "SELECT count(*) from hms_assignment
- Create a ticketCreate a ticket
Method count_outstanding_invites_by_class
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function count_outstanding_invites_by_class($term, $class)
{
$now = time();
$term_year = Term::getTermYear($term);
- Create a ticketCreate a ticket
Method count_remaining_entries_by_class
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function count_remaining_entries_by_class($term, $class)
{
$now = time();
$term_year = Term::getTermYear($term);
- Create a ticketCreate a ticket
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
if(!\Current_User::allow('hms', 'room_structure')){
throw new PermissionException('You do not have permission to add a room.');
}
- Create a ticketCreate a ticket
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
$requestId = $context->get('requestId');
$reason = $context->get('cancel-reason');
- Create a ticketCreate a ticket
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
// Check permissions
if (!\Current_User::allow('hms', 'checkin')) {
throw new PermissionException('You do not have permission to checkin students.');
- Create a ticketCreate a ticket
Method save
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function save(Contract $contract)
{
$db = PdoFactory::getPdoInstance();
$id = $contract->getId();
- Create a ticketCreate a ticket
Method count_avail_lottery_rooms
has 29 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 show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$submitCmd = CommandFactory::getCommand('AddRoomDamage');
$submitCmd->setRoom($this->room);
- Create a ticketCreate a ticket
Method sendRoomChangeDeniedNotice
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sendRoomChangeDeniedNotice(RoomChangeRequest $r)
{
$subject = 'Room Change Denied';
$template = 'email/roomChangeDeniedNotice.tpl';
- Create a ticketCreate a ticket
Method show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
if($this->halls == NULL){
- Create a ticketCreate a ticket
Method sendRoomChangeInProcessNotice
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sendRoomChangeInProcessNotice(RoomChangeRequest $r)
{
$subject = 'Room Change Approved!';
$template = 'email/roomChangeApprovalNotice.tpl';
- Create a ticketCreate a ticket
Method getCumulativeCountsByTerm
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getCumulativeCountsByTerm($term)
{
// If the report is for fall, we really want Summer 1 and Summer 2 applications terms too.
// So, build a list of extra application terms we should use.
$extraTerms = array();
- Create a ticketCreate a ticket
Similar blocks of code found in 4 locations. Consider refactoring. Open
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 58.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 58.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 58.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
while (index < length) {
if (match('}')) {
break;
}
sourceElement = parseSourceElement();
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 58.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76