Showing 8,683 of 8,684 total issues
File New_WFC_Deli_SquareTags.php
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use COREPOS\Fannie\API\FanniePlugin;
if (!class_exists('FpdfWithBarcode')) {
include(dirname(__FILE__) . '/../FpdfWithBarcode.php');
}
Method handleResponseAuth
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function handleResponseAuth($authResult)
{
$json = json_decode($authResult['response'], true);
// initialize
Method validateRequirement
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateRequirement($req, $json)
{
// non-existant requirement is treated as valid
if (!property_exists($req, 'value')) {
$req->valid = true;
Method run
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
global $FANNIE_OP_DB, $FANNIE_TRANS_DB, $FANNIE_ARCHIVE_DB, $FANNIE_ARCHIVE_METHOD;
$sql = FannieDB::get($FANNIE_TRANS_DB);
$sql->throwOnFailure(true);
Method fetch_report_data
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$mems = array();
$period = new PeriodsModel($this->connection);
Method fetch_report_data
has 81 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 run
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
global $argv, $FANNIE_OP_DB, $FANNIE_PLUGIN_SETTINGS;
$dbc = FannieDB::get($FANNIE_OP_DB);
$dateObj = new SpinsDate($FANNIE_PLUGIN_SETTINGS['SpinsOffset']);
Method css_content
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function css_content()
{
return '
table td,th {
border-top: none !important;
Method getView
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getView()
{
$dbc = $this->connection;
$vendorInvoiceID = FormLib::get('vendorInvoiceID');
$date1 = FormLib::get('date1');
Method drawPDF
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drawPDF()
{
$pdf = new \FPDF('L', 'mm', 'Letter');
$pdf->SetMargins(6.35, 6.35, 6.35);
$pdf->SetAutoPageBreak(false);
Method editForm
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function editForm($upc,$isNew)
{
$FANNIE_PRODUCT_MODULES = $this->getConfiguredModules();
$FANNIE_URL = $this->config->get('URL');
$shown = array();
Method get_id_print_handler
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_id_print_handler()
{
$store = COREPOS\Fannie\API\lib\Store::getIdByIp();
$mtLength = $store == 1 ? 3 : 7;
Method ReadAsBytesInternal
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
internal byte[] ReadAsBytesInternal()
{
_readType = ReadType.ReadAsBytes;
JsonToken t;
Identical blocks of code found in 2 locations. Consider refactoring. Open
while($row = $sql->fetch_row($result)) {
$order_ids[] = (int)$row['mixMatch'];
$trans_ids[] = (int)$row['matched'];
// log to history if entry doesn't already exist
- 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 146.
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
while($row = $sql->fetch_row($result)) {
$order_ids[] = (int)$row['mixMatch'];
$trans_ids[] = (int)$row['matched'];
// log to history if entry doesn't already exist
- 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 146.
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
private function previewTrans($trans)
{
list($emp, $reg, $tID) = explode('::', $trans);
$dbc = Database::tDataConnect();
$previewP = $dbc->prepare("
- 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 146.
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
private function previewTrans($trans)
{
list($emp, $reg, $tID) = explode('::', $trans);
$dbc = Database::tDataConnect();
$previewP = $dbc->prepare("
- 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 146.
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
private function previewTrans($trans)
{
list($reg, $emp, $tID) = explode('::', $trans);
$dbc = Database::tDataConnect();
$previewP = $dbc->prepare("
- 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 146.
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
Function scanRecorder
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
var scanRecorder = (function ($) {
var prefix = "SaScan_";
var mod = {};
Function msi
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
var msi = (function ($) {
var mod = {};
function getItemRow(type, col) {