Showing 8,683 of 8,684 total issues
File PISuspensionPage.php
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
File CoopCredJiggerTool.php
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2010,2013 Whole Foods Co-op, Duluth, MN
Copyright 2014 West End Food Co-op, Toronto, ON, Canada
File RBA_Stub.cs
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.IO.Ports;
using System.Threading;
using System.Collections;
using System.Collections.Generic;
Method sendAuth
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function sendAuth()
{
// initialize
$dbTrans = PaycardLib::paycard_db();
if (!$dbTrans) {
Method results_content
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function results_content()
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
$start = date('Y-m-d', strtotime(FormLib::get_form_value('start',date('Y-m-d'))));
Method get_id_view
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_id_view()
{
global $FANNIE_URL;
$ret = '';
Method etl
has 118 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 fetch_report_data
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$dbc = $this->connection;
try {
Method loadItems
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadItems()
{
if ($this->source == 'provided') {
return $this->items;
}
File JsonSchemaBuilder.cs
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Serialization;
#if NET20
using Newtonsoft.Json.Utilities.LinqBridge;
Identical blocks of code found in 2 locations. Consider refactoring. Open
public function cliWrapper()
{
$out = $this->post_view();
$out = str_replace('<tr>', '', $out);
$out = str_replace('<td>', '', $out);
- 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 177.
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
public function cliWrapper()
{
$out = $this->post_view();
$out = str_replace('<tr>', '', $out);
$out = str_replace('<td>', '', $out);
- 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 177.
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 (!isset($otherData[$lc])) {
$otherData[$lc] = array();
} else {
if (!in_array($lc, $dupes)) {
$dupes[] = $lc;
- 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 177.
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 (!isset($otherData[$lc])) {
$otherData[$lc] = array();
} else {
if (!in_array($lc, $dupes)) {
$dupes[] = $lc;
- 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 177.
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
if (isset($item['batchName']) && strstr($item['batchName'], 'Co-op Deals') && !strstr($item['batchName'], 'TPR')) {
return __DIR__ . '/cd_line_16.png';
} elseif (isset($item['batchName']) && strstr(strtoupper($item['batchName']), 'FRESH DEALS')) {
return __DIR__ . '/noauto/images/freshdeals_bottom_4.png';
} elseif (!empty($item['batchName'])) {
- 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 177.
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
if (isset($item['batchName']) && strstr($item['batchName'], 'Co-op Deals') && !strstr($item['batchName'], 'TPR')) {
return __DIR__ . '/noauto/images/codeals_top_2.png';
} elseif (isset($item['batchName']) && strstr(strtoupper($item['batchName']), 'FRESH DEALS')) {
return __DIR__ . '/noauto/images/freshdeals_top_4.png';
} elseif (!empty($item['batchName'])) {
- 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 177.
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 DefaultUploadPage.php
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
Function lcBatch
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
var lcBatch = (function ($) {
var mod = {};
mod.toggleInact = function(show) {
Method parse
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse($str){
global $CORE_LOCAL;
$ret = $this->default_json();
$pStyle = "<p style='font-weight:bold; text-align:center; margin: 0em 0em 0em -1.0em;'>";
if (!in_array('CoopCred', $CORE_LOCAL->get('PluginList'))) {
Method get_view
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_view()
{
$ret = '';
$ret .= '<form action="' . filter_input(INPUT_SERVER, 'PHP_SELF') . '" method="post" id="signform">';
$mods = FannieAPI::listModules('\COREPOS\Fannie\API\item\FannieSignage');