Showing 8,683 of 8,684 total issues
Method calculateHoldings
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function calculateHoldings($endDate)
{
global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['GiveUsMoneyDB']);
Method post_id_handler
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function post_id_handler()
{
// forcing sequential requests here
$_SESSION['appendingOrder'] = true;
Method etl
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function etl($config)
{
$settings = $config->get('PLUGIN_SETTINGS');
$mydb = $settings['MyWebDB'] . $this->connection->sep();
$opdb = $config->get('OP_DB') . $this->connection->sep();
Method refresh_data
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function refresh_data($trans_db, $month, $year, $day=False)
{
list($start_id, $start_date, $end_id, $end_date) = $this->dates($month, $year, $day);
$config = FannieConfig::factory();
Method get_id_view
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
$model = new NcgCouponsModel($this->connection);
$model->couponUPC($this->id);
$model->load();
Method preprocess
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function preprocess(){
global $FANNIE_URL,$FANNIE_PLUGIN_LIST,$FANNIE_PLUGIN_SETTINGS;
if (!isset($FANNIE_PLUGIN_LIST) || !in_array('CoopCred', $FANNIE_PLUGIN_LIST)) {
Method get_view
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_view()
{
$dbc = $this->connection;
$settings = $this->config->get('PLUGIN_SETTINGS');
$dbc->selectDB($settings['VolunteerHoursDB']);
Method get_id_view
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
$userID = FannieAuth::getUID($this->current_user);
Method drawPDF
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drawPDF()
{
$pdf = new \FPDF('P', 'mm', 'Letter');
$pdf->SetTopMargin($this->top); //Set top margin of the page
Method get_id_view
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_id_view()
{
$store = FormLib::get('store', false);
if (!$store) {
$store = Store::getIdByIp();
Method body_content
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function body_content()
{
global $FANNIE_OP_DB, $FANNIE_URL;
$vid = FormLib::get_form_value('vid');
if ($vid === ''){
Method getExistingItem
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getExistingItem($upc)
{
$dbc = $this->db();
$itemQ = '
SELECT
Method SaveFormData
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SaveFormData($upc){
$upc = BarcodeLib::padUPC($upc);
$ids = FormLib::get_form_value('v_id',array());
$skus = FormLib::get_form_value('v_sku',array());
$costs = FormLib::get_form_value('v_cost',array());
Method WriteTo
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public override void WriteTo(JsonWriter writer, params JsonConverter[] converters)
{
if (converters != null && converters.Length > 0 && _value != null)
{
JsonConverter matchingConverter = JsonSerializer.GetMatchingConverter(converters, _value.GetType());
Method ProcessEMV
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected string ProcessEMV(string xml, bool autoReset)
{
/*
Substitute values into the XML request
This is so the driver can handle any change
Identical blocks of code found in 2 locations. Consider refactoring. Open
if($labelCount == 32){
$pdf->AddPage('P');
$descTop = $top + $hspace;
$barLeft = $left + 4;
$barTop = $descTop + 16;
- 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 135.
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
if($labelCount == 32){
$pdf->AddPage('P');
$descTop = $top + $hspace;
$barLeft = $left + 4;
$barTop = $descTop + 16;
- 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 135.
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
function form_content()
{
$vid = FormLib::get('vid');
if ($vid === ''){
$this->add_onload_command("\$('#FannieUploadForm').remove();");
- 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 135.
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
function form_content()
{
$vid = FormLib::get('vid');
if ($vid === ''){
$this->add_onload_command("\$('#FannieUploadForm').remove();");
- 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 135.
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
<?php
/*******************************************************************************
Copyright 2018 Whole Foods Co-op
- 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 135.
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