Showing 8,683 of 8,684 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
function getElementLeft() {
var x = 0;
var elm;
if(typeof(p_elm) == "object"){
elm = p_elm;
- Read upRead up
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 99.
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
override public void HandleMsg(string msg)
{
if (msg == "errorBeep") {
Beeps(3);
} else if (msg == "beepTwice") {
- Read upRead up
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 221.
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
override public void HandleMsg(string msg)
{
if (msg == "errorBeep") {
Beeps(3);
} else if (msg == "beepTwice") {
- Read upRead up
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 221.
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 VendorAliasesPage.php
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2014 Foods Co-op
Method parse
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse($str)
{
$ret = $this->default_json();
// this is the currently selected item
Method doc
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doc()
{
return '
Use:
This table records information about integrated
Method body_content
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function body_content()
{
$this->addScript('type-editor.js');
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
Method preprocess
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function preprocess()
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
Method fetch_report_data
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$dbc = $this->connection;
$parts = FormLib::standardItemFromWhere();
$query = $parts['query'];
Method form_content
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function form_content()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
ob_start();
Method getIngredientList
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getIngredientList($dbc, $id)
{
/**
* Query notes:
*
Method wideReportData
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function wideReportData($date1, $date2, $store)
{
$itemP = $this->connection->prepare("SELECT u.brand, u.description, i.upc
FROM PickupOrders AS o
INNER JOIN PickupOrderItems AS i ON i.pickupOrderID=o.pickupOrderID
Method doInsert
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function doInsert($dtrans,$amount,$department,$cardno){
global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
$dbc = FannieDB::get($FANNIE_TRANS_DB);
$OP = $FANNIE_OP_DB.$dbc->sep();
Method doc
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doc()
{
return '
Use:
This table records information about integrated
Method lineaJS
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function lineaJS()
{
ob_start();
?>
function lineaBarcode(upc, selector, callback) {
Method post_newbatch_tags_upcs_newprices_handler
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function post_newbatch_tags_upcs_newprices_handler()
{
global $FANNIE_OP_DB, $FANNIE_URL;
$this->upcs = json_decode($this->upcs);
$this->newprices = json_decode($this->newprices);
Identical blocks of code found in 2 locations. Consider refactoring. Open
$item = array(
'upc' => '',
'description' => $descriptions[$i],
'posDescription' => $descriptions[$i],
'brand' => $brands[$i],
- Read upRead up
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 145.
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
$item = array(
'upc' => '',
'description' => $descriptions[$i],
'posDescription' => $descriptions[$i],
'brand' => $brands[$i],
- Read upRead up
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 145.
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 PaycardEmvWic.php
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This page does not really have a UI and just exists
* to run javascript and process responses. It flows like this:
File SpecialOrdersTask.php
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2011 Whole Foods Co-op