Showing 8,683 of 8,684 total issues
Method post_id_handler
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function post_id_handler()
{
// forcing sequential requests here
$_SESSION['appendingOrder'] = true;
Method skipDates
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function skipDates($upc, $created, $sold, $storeID=false)
{
if ($created <= 0 && $sold <= 0) {
return false;
}
Method post_id_handler
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function post_id_handler()
{
// forcing sequential requests here
$_SESSION['appendingOrder'] = true;
Method get_view
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_view()
{
$store = FormLib::get('store', false);
if (!$store) {
$store = COREPOS\Fannie\API\lib\Store::getIdByIp();
Method processMail
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processMail($msg)
{
$info = $this->parseEmail($msg);
$boundary = $this->hasAttachments($info['headers']);
$dbc = \FannieDB::get(\FannieConfig::config('OP_DB'));
Method put_view
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function put_view()
{
$stores = FormLib::storePicker('store', false);
$res = $this->connection->query('
SELECT v.vendorID, v.vendorName
Method get_id_view
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
$pager = FormLib::get('pager', '');
$query = 'SELECT p.orderID, p.vendorID, MIN(creationDate) as creationDate,
Method fetch_report_data
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
Method preprocess
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function preprocess()
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($this->config->get('OP_DB'));
$FANNIE_EMP_NO = $this->config->get('EMP_NO');
File MemArEquityDumpTool.php
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2010,2013 Whole Foods Co-op, Duluth, MN
Method get_date1_date2_handler
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_date1_date2_handler()
{
$dbc = FannieDB::get($this->config->get('OP_DB'));
$dlog = DTransactionsModel::selectDlog($this->date1, $this->date2);
$dtrans = DTransactionsModel::selectDtrans($this->date1, $this->date2);
File BsonBinaryWriter.cs
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Globalization;
using System.IO;
using System.Text;
using Newtonsoft.Json.Utilities;
Method ParsePostValue
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
private bool ParsePostValue()
{
while (true)
{
char currentChar = _chars[_charPos];
Method ResolvePropertyAndCreatorValues
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
private IDictionary<JsonProperty, object> ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType, out IDictionary<string, object> extensionData)
{
extensionData = (contract.ExtensionDataSetter != null) ? new Dictionary<string, object>() : null;
IDictionary<JsonProperty, object> propertyValues = new Dictionary<JsonProperty, object>();
Identical blocks of code found in 3 locations. Consider refactoring. Open
protected List<Point> SigDataToPoints(string data)
{
char[] comma = new char[]{','};
char[] colon = new char[]{':'};
var pairs = from pair in data.Split(colon)
- 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 178.
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 3 locations. Consider refactoring. Open
protected List<Point> SigDataToPoints(string data)
{
char[] comma = new char[]{','};
char[] colon = new char[]{':'};
var pairs = from pair in data.Split(colon)
- 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 178.
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 3 locations. Consider refactoring. Open
protected List<Point> SigDataToPoints(string data)
{
char[] comma = new char[]{','};
char[] colon = new char[]{':'};
var pairs = from pair in data.Split(colon)
- 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 178.
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 CalendarControl.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
function positionInfo(object) {
var p_elm = object;
this.getElementLeft = getElementLeft;
File ManufacturerMovementReport.php
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2012 Whole Foods Co-op
Similar blocks of code found in 2 locations. Consider refactoring. Open
$('.dept'+deptID).each(function(){
pArray.push($(this).find('.newprice').val());
uArray.push($(this).find('.itemupc').val());
});
- 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 84.
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