Showing 1,397 of 1,397 total issues
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context){
$term = Term::getCurrentTerm();
// Get the list of role memberships this user has
- Create a ticketCreate a ticket
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context){
$errorCmd = CommandFactory::getCommand('ShowStudentMenu');
$term = $context->get('term');
$student = StudentFactory::getStudentByUsername(UserStatus::getUsername(), $term);
- Create a ticketCreate a ticket
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
$term = $context->get('term');
$errorCmd = CommandFactory::getCommand('ShowOffCampusWaitListApplication');
- Create a ticketCreate a ticket
Method copy
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function copy($to_term, $room_id, $assignments)
{
if (!$this->id) {
return false;
}
- Create a ticketCreate a ticket
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
$pdo = PdoFactory::getPdoInstance();
$sql = "SELECT
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (object &&
object.type === Syntax.CallExpression &&
object.callee.type === Syntax.MemberExpression &&
object.callee.object.type === Syntax.Identifier &&
object.callee.object.name === 'React' &&
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if(($room->gender_type != $this->student->getGender() && $room->gender_type != AUTO)
|| $num_avail_beds == 0
|| $room->reserved == 1
|| $room->offline == 1
|| $room->private == 1
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if ($result['rlc_first_choice_id'] == $resultb['rlc_first_choice_id'] ||
$result['rlc_first_choice_id'] == $resultb['rlc_second_choice_id'] ||
$result['rlc_first_choice_id'] == $resultb['rlc_third_choice_id'] ||
$result['rlc_second_choice_id'] == $resultb['rlc_first_choice_id'] ||
$result['rlc_second_choice_id'] == $resultb['rlc_second_choice_id'] ||
- Create a ticketCreate a ticket
Identical blocks of code found in 2 locations. Consider refactoring. Open
public function unassignedStudentsFields()
{
$fields = parent::unassignedStudentsFields();
$fields['lifestyle'] = $this->getLifestyleOption() == 1 ? 'Single gender' : 'Co-ed';
- 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 114.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
public function unassignedStudentsFields()
{
$fields = parent::unassignedStudentsFields();
$fields['lifestyle'] = $this->getLifestyleOption() == 1 ? 'Single gender' : 'Co-ed';
- 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 114.
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
Function processComment
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processComment(node) {
var lastChild,
trailingComments,
bottomRight = extra.bottomRightStack,
last = bottomRight[bottomRight.length - 1];
- Create a ticketCreate a ticket
Function parseObjectInitialiser
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseObjectInitialiser() {
var properties = [], property, name, kind, storedKind, map = new StringMap(),
marker = markerCreate(), toString = String;
expect('{');
- Create a ticketCreate a ticket
Method execute
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
// Get input
$requestId = $context->get('requestId');
$participantId = $context->get('participantId');
- Create a ticketCreate a ticket
Method show
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
# Get the roommate request record from the database
$bed = new Bed($this->request['bed_id']);
$room = $bed->get_parent();
- Create a ticketCreate a ticket
Method execute
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function execute()
{
session_start();
\PHPWS_Core::initModClass('users', 'Users.php');
\PHPWS_Core::initModClass('users', 'Current_User.php');
- Create a ticketCreate a ticket
Method copy
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function copy($to_term, $hall_id, $assignments = false, $roles = false)
{
if(!$this->id) {
return false;
}
- Create a ticketCreate a ticket
Method __construct
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($id = 0, $term = NULL, $banner_id = NULL, $username = NULL, $gender = NULL, $student_type = NULL, $application_term = NULL, $cell_phone = NULL, $meal_plan = NULL, $international = NULL, $waitlistReason = NULL, $oncampusReason = NULL, $oncampusOtherReason = NULL)
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function setRemove($removed_reason=UNASSIGN_NOREASON, $removed_by=null, $removed_on=null) {
if ( is_null($removed_on) ) // use current time
$this->removed_on = $this->getTimestamp();
else
$this->removed_on = $removed_on;
- 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 113.
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
public function delete()
{
if (is_null($this->id) || !isset($this->id)) {
throw new \InvalidArgumentException('Invalid bed id.');
}
- 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 113.
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
public function setAssign($assign_reason=ASSIGN_NOREASON, $assigned_by=null, $assigned_on=null) {
if ( is_null($assigned_on) ) // use current time
$this->assigned_on = $this->getTimestamp();
else
$this->assigned_on = $assigned_on;
- 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 113.
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