Showing 8,683 of 8,684 total issues
Method dont_print_nothing_handler
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function dont_print_nothing_handler()
{
$store = COREPOS\Fannie\API\lib\Store::getIdByIp();
$mtLength = $store == 1 ? 3 : 7;
File BsonWriter.cs
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
Method PopulateList
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
private object PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, string id)
{
IWrappedCollection wrappedCollection = list as IWrappedCollection;
object underlyingList = wrappedCollection != null ? wrappedCollection.UnderlyingCollection : list;
Method ParseData
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
private string ParseData(string s)
{
if (s.Substring(0,2) == "S0") { // scanner message
if (s.Substring(0,4) == "S08A" || s.Substring(0,4) == "S08F") { // UPC-A or EAN-13
return s.Substring(4);
Method ParseData
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
private string ParseData(string s)
{
if (s.Substring(0,1) == "0") { // scanner message
if (s.Substring(0,3) == "08A" || s.Substring(0,3) == "08F") { // UPC-A or EAN-13
return s.Substring(3);
MercuryE2E
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class MercuryE2E extends BasicCCModule
{
private $voidTrans;
private $voidRef;
protected $SOAPACTION = "http://www.mercurypay.com/CreditTransaction";
Class JsonSerializer
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public class JsonSerializer
{
internal TypeNameHandling _typeNameHandling;
internal FormatterAssemblyStyle _typeNameAssemblyFormat;
internal PreserveReferencesHandling _preserveReferencesHandling;
Similar blocks of code found in 3 locations. Consider refactoring. Open
try:
opts, args = getopt.getopt(sys.argv[1:], "u:p:v", ["user=", "password=", "verbose"])
except getopt.GetoptError as err:
print((str(err)))
usage()
- 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 60.
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 3 locations. Consider refactoring. Open
try:
opts, args = getopt.getopt(sys.argv[1:], "u:p:a:", ["user=", "password=", "account="])
except getopt.GetoptError as err:
print((str(err)))
usage()
- 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 60.
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 3 locations. Consider refactoring. Open
try:
opts, args = getopt.getopt(sys.argv[1:], "u:p:a:", ["user=", "password=", "account="])
except getopt.GetoptError as err:
print((str(err)))
usage()
- 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 60.
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
$data[] = array(
'Transactions',
number_format($total_trans->lastYear),
number_format($proj_trans),
'',
- 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 138.
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
$data[] = array(
'Transactions',
number_format($total_trans->lastYear),
number_format($proj_trans),
'',
- 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 138.
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 OrderGenTask.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2015 Whole Foods Co-op
File New_WFC_Deli_Narrow.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use COREPOS\Fannie\API\FanniePlugin;
if (!class_exists('FpdfWithBarcode')) {
include(dirname(__FILE__) . '/../FpdfWithBarcode.php');
}
File MKSalesSummaryReport.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use COREPOS\Fannie\API\data\DataCache;
include(dirname(__FILE__).'/../../../../config.php');
Method prepareDataCapBalance
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function prepareDataCapBalance($type, $prompt=false)
{
$this->conf->set('DatacapBalanceCheck', '??');
$this->conf->set('EWICBalance', '??');
$termID = $this->getTermID();
Method plugin_transaction_reset
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function plugin_transaction_reset(){
global $CORE_LOCAL;
$dbc = CoopCredLib::ccDataConnect();
if ($dbc === False) {
Method setMember
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
static public function setMember($member, $personNumber, $row=array())
{
$conn = Database::pDataConnect();
/**
Method message
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function message($val, $ref, $reprint=False)
{
$date = date('Ymd');
list($emp, $reg, $trans) = ReceiptLib::parseRef($ref);
$slip = '';
Method checkPriceChanges
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkPriceChanges()
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);