Showing 8,683 of 8,684 total issues
Method fetch_report_data
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fetch_report_data(){
//global $FANNIE_TRANS_DB,
global $FANNIE_OP_DB, $FANNIE_URL;
global $FANNIE_PLUGIN_SETTINGS;
File PaycardFixReturn.php
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
include(__DIR__ . '/../../../config.php');
if (!class_exists('FannieAPI')) {
include(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
File PaycardFixSale.php
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
include(__DIR__ . '/../../../config.php');
if (!class_exists('FannieAPI')) {
include(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
File view.js
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
$(document).ready(function(){
var initoid = $('#init_oid').val();
$.ajax({
url: 'ajax-calls.php',
File Creator.php
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace COREPOS\pos\install\db;
use COREPOS\pos\lib\CoreState;
File LikeCodeAjax.php
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2009 Whole Foods Co-op
Class BsonWriter
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
public class BsonWriter : JsonWriter
{
private readonly BsonBinaryWriter _writer;
private BsonToken _root;
Class TraceJsonWriter
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
internal class TraceJsonWriter : JsonWriter
{
private readonly JsonWriter _innerWriter;
private readonly JsonTextWriter _textWriter;
private readonly StringWriter _sw;
Method preprocess
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
function preprocess(){
// set variable ahead of time
// so we know if lookup found no one
// vs. lookup didn't happen
$this->temp_num_rows = -1;
Method javascript_content
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
function javascript_content(){
ob_start();
?>
function setdate()
Method process
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process($filename)
{
$fp = fopen($filename, 'r');
$currentOrder = array('id' => false, 'total' => 0, 'qty' => 0, 'fees' => 0, 'card_no' => 11, 'tdate' => '', 'items' => array());
$storeID = 0;
File PcMonthlyReport.php
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
File DepartmentMovementReport.php
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2012 Whole Foods Co-op
Similar blocks of code found in 3 locations. Consider refactoring. Open
class WFC_Double_PDF extends FpdfWithBarcode
{
private $tagdate;
function setTagDate($str){
$this->tagdate = $str;
- 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 186.
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
class WFC_Produce_PDF extends FpdfWithBarcode
{
private $tagdate;
function setTagDate($str){
$this->tagdate = $str;
- 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 186.
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
class WFC_Produce_Single_PDF extends FpdfWithBarcode
{
private $tagdate;
function setTagDate($str){
$this->tagdate = $str;
- 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 186.
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 ($w['card_no'] != 11 && $w['card_no'] != 9) {
$r = $dbc->execute($afterBasketP, array($w['card_no'], $date_id, $basket['start_time']));
while ($after = $dbc->fetchRow($r)) {
$record[] = substr($after[0], 0, 4) . '-' . substr($after[0], 4, 2) . '-' . substr($after[0], -2) . ' ' . $after[2];
$avg_after += $after[2];
- 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 186.
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 ($w['card_no'] != 11 && $w['card_no'] != 9) {
$r = $dbc->execute($beforeBasketP, array($w['card_no'], $date_id, $basket['start_time']));
while ($before = $dbc->fetchRow($r)) {
$befores[] = substr($before[0], 0, 4) . '-' . substr($before[0], 4, 2) . '-' . substr($before[0], -2) . ' ' . $before[2];
$avg_before += $before[2];
- 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 186.
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 doc
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doc()
{
return '
Use:
This is IT CORE\'s transaction log. A rather important table.
Method viewOrEdit
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function viewOrEdit($emp)
{
$canEdit = FannieAuth::validateUserQuiet('hr_editor');
$this->connection->selectDB($this->default_db);
$store = new StoresModel($this->connection);