Showing 1,397 of 1,397 total issues
Function parseArrayInitialiser
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseArrayInitialiser() {
var elements = [], blocks = [], filter = null, tmp, possiblecomprehension = true,
marker = markerCreate();
expect('[');
- Create a ticketCreate a ticket
Method show
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['DATES'] = HMS_Util::getPrettyDateRange($this->startDate, $this->endDate);
- Create a ticketCreate a ticket
Method execute
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context)
{
$term = $context->get('term');
if (!isset($term)) {
- Create a ticketCreate a ticket
Method show
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
if (empty($this->housingApps)) {
- Create a ticketCreate a ticket
File HMS_Util.php
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Homestead;
/**
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
public static function getCurrentStateForParticipant(RoomChangeParticipant $participant)
{
$db = PdoFactory::getPdoInstance();
$query = "SELECT * FROM hms_room_change_curr_participant WHERE participant_id = :participantId";
- 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 125.
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 static function getCurrentState(RoomChangeRequest $request)
{
$db = PdoFactory::getPdoInstance();
$query = "SELECT * FROM hms_room_change_curr_request WHERE id = :requestId";
- 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 125.
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
File Term.php
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Homestead;
use \Homestead\Exception\DatabaseException;
- Create a ticketCreate a ticket
HMS_Lottery
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class HMS_Lottery {
/**
* Looks for an entry with the 'magic_winner' flag set and returns it, otherwise it returns null
*/
- Create a ticketCreate a ticket
HMS_Util
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class HMS_Util{
/**
* Returns an array where the keys are numeric 1-12, values are text month names
*/
- Create a ticketCreate a ticket
RoomChangeParticipant
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class RoomChangeParticipant {
protected $id;
protected $request_id;
- Create a ticketCreate a ticket
Function parseObjectType
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseObjectType(allowStatic) {
var callProperties = [], indexers = [], marker, optional = false,
properties = [], propertyKey, propertyTypeAnnotation,
token, isStatic, matchStatic;
- Create a ticketCreate a ticket
Function binaryPrecedence
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function binaryPrecedence(token, allowIn) {
var prec = 0;
if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
return 0;
- Create a ticketCreate a ticket
Method execute
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(CommandContext $context){
$term = Term::getSelectedTerm();
$messageAll = \Current_User::allow('hms', 'email_all');
- Create a ticketCreate a ticket
Function 39
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"./jsx":37,"jstransform":22,"jstransform/src/utils":23}],39:[function(_dereq_,module,exports){
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
- Create a ticketCreate a ticket
Method show
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
\Layout::addPageTitle("RLC Application");
javascript('jquery');
- Create a ticketCreate a ticket
Method show
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$floor = new Floor($this->floorId);
$tpl = array();
- Create a ticketCreate a ticket
Method show
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$tpl = array();
$tpl['HALL_NAME'] = $this->hall->getLink();
$tpl['FLOOR_NUMBER_LINK'] = $this->floor->getLink('Floor');
- Create a ticketCreate a ticket
Method show
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$f = $this->feature;
$reg = $f->getRegistration();
- Create a ticketCreate a ticket
Identical blocks of code found in 4 locations. Consider refactoring. Open
if(isset($this->cell_phone) && !is_null($this->cell_phone) && $this->cell_phone != ''){
$tags['PHONE'] = '('.substr($this->cell_phone, 0, 3).')';
$tags['PHONE'] .= substr($this->cell_phone, 3, 3);
$tags['PHONE'] .= '-'.substr($this->cell_phone, 6, 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 124.
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