Showing 8,683 of 8,684 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
function doTask(str){
var val;
switch(str){
case 'clear':
ND_hide();
- 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 126.
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
function LD_doTask(str){
var val;
switch(str){
case 'clear':
LD_hide();
- 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 126.
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
Method css_content
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function css_content()
{
return <<<HTML
span.grey {
color: grey;
File HourlySalesReport.php
has 355 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
Method WFC_Narrow
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
function WFC_Narrow($data,$offset=0)
{
$pdf=new WFC_Narrow_PDF('P','mm','Letter'); //start new instance of PDF
$pdf->Open(); //open new PDF Document
$pdf->SetTopMargin(40); //Set top margin of the page
Method body_content
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function body_content()
{
$db = WfcHtLib::hours_dbconnect();
$ppID = -1;
Method post_id_handler
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function post_id_handler()
{
$store = COREPOS\Fannie\API\lib\Store::getIdByIp();
$dbc = $this->connection;
$prep = $dbc->prepare("
Method run
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
if (!class_exists('Automattic\WooCommerce\Client')) {
$this->cronMsg('Library missing. Use composer to install automattic/woocommerce');
return false;
Method get_newgc_view
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_newgc_view()
{
$json = FormLib::get('json');
$dbc = FannieDB::get($this->config->get('OP_DB'));
Method get_start_view
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_start_view()
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
Class NativeMethods
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
unsafe static class NativeMethods
{
// For constants, see PInvoke.Net,
// http://doxygen.reactos.org/de/d2a/hidclass_8h_source.html
// http://www.rpi.edu/dept/cis/software/g77-mingw32/include/winioctl.h
Similar blocks of code found in 4 locations. Consider refactoring. Open
case '0.25':
count = Math.floor(Number(document.getElementById('dropAmount'+d).value) / 10);
val = Number(document.getElementById('dropAmount'+d).value) - (10*count);
document.getElementById('depositAmount'+d).innerHTML = Math.round(val*100)/100;
updateBuyAmount(d);
- 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 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 4 locations. Consider refactoring. Open
case '0.01':
count = Math.floor(Number(document.getElementById('dropAmount'+d).value) / 0.50);
val = Number(document.getElementById('dropAmount'+d).value) - (0.50*count);
document.getElementById('depositAmount'+d).innerHTML = Math.round(val*100)/100;
updateBuyAmount(d);
- 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 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 4 locations. Consider refactoring. Open
case '0.05':
count = Math.floor(Number(document.getElementById('dropAmount'+d).value) / 2);
val = Number(document.getElementById('dropAmount'+d).value) - (2*count);
document.getElementById('depositAmount'+d).innerHTML = Math.round(val*100)/100;
updateBuyAmount(d);
- 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 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 4 locations. Consider refactoring. Open
case '0.10':
count = Math.floor(Number(document.getElementById('dropAmount'+d).value) / 5);
val = Number(document.getElementById('dropAmount'+d).value) - (5*count);
document.getElementById('depositAmount'+d).innerHTML = Math.round(val*100)/100;
updateBuyAmount(d);
- 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 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 ScreeningPage.php
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
include(__DIR__ . '/../../../../config.php');
if (!class_exists('FannieAPI')) {
include(__DIR__ . '/../../../../classlib2.0/FannieAPI.php');
Method fetch_report_data
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
/* provide a department range and date range to
get history for all products in those departments
for that time period AND current price
Method body_content
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function body_content()
{
global $FANNIE_OP_DB, $FANNIE_URL;
ob_start();
$dbc = FannieDB::get($FANNIE_OP_DB);
Method process_file
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process_file($linedata, $indexes)
{
global $FANNIE_OP_DB;
$PHONE = $this->get_column_index('phone');
$CONTACT = $this->get_column_index('name');
Method run
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
if (!class_exists('Automattic\WooCommerce\Client')) {
$this->cronMsg('Library missing. Use composer to install automattic/woocommerce');
return false;