Showing 8,683 of 8,684 total issues
Method fetch_report_data
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
try {
$super = $this->form->buyer;
$dept1 = $this->form->deptStart;
Method get_view
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_view()
{
$lib_class = $this->lib_class;
$dbc = $lib_class::getDB();
Method run
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$dbc = FannieDB::get($this->config->get('OP_DB'));
if (!class_exists('InstaFileV3')) {
Method run
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$dbc = FannieDB::get($this->config->get('OP_DB'));
$dbc->query("INSERT INTO RpSnapshots (userID, tdate, data, dataType)
SELECT userID, " . $dbc->now() . ", data, dataType FROM RpSessions");
Method definition
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function definition()
{
global $FANNIE_TRANS_DB;
/* List of CoopCred paymentDepartment's
Method drawItem
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function drawItem($pdf, $item, $row, $column)
{
$effective_width = $this->width - (2*$this->left);
$price = $this->printablePrice($item);
Method javascript_content
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function javascript_content()
{
ob_start();
?>
function doubleBeep() {
Method get_id_view
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
$model = new CustomerNotificationsModel($this->connection);
$model->cardNo($this->id);
$body = '';
Method legacySync
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function legacySync($card_no)
{
$dbc = $this->connection;
$custdata = new CustdataModel($dbc);
Method drawPDF
has 70 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_view
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_view()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
$model = new $this->model_name($dbc);
Method ReadNormal
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
private bool ReadNormal()
{
switch (CurrentState)
{
case State.Start:
Method ReadMetadataPropertiesToken
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
private bool ReadMetadataPropertiesToken(JTokenReader reader, ref Type objectType, ref JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue, out object newValue, out string id)
{
id = null;
newValue = null;
Method Read
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public override void Read()
{
ReInitDevice();
RBA_Stub emailRBA = null;
if (device_identifier.Contains("INGENICO")) {
Method Choice
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
private bool Choice(string str)
{
bool ret = false;
if (str.Substring(1,4) == "24.0") {
switch (str.Substring(5,1)) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
function issueCheck(id) {
if ($('#issueCheckbox').attr('checked')) {
location = 'GumEquityPayoffPage.php?id=' + id + '&pdf=1&issued=1';
$('#issueCheckbox').attr('disabled', 'disabled');
var d = new Date();
- 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 91.
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
function issueCheck(id) {
if ($('#issueCheckbox').prop('checked')) {
location = 'GumLoanPayoffPage.php?id=' + id + '&pdf=1&issued=1';
$('#issueCheckbox').attr('disabled', 'disabled');
var d = new Date();
- 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 91.
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 ScanTransferPage.php
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
include(dirname(__FILE__) . '/../config.php');
if (!class_exists('FannieAPI')) {
include_once(__DIR__ . '/../classlib2.0/FannieAPI.php');
Identical blocks of code found in 3 locations. Consider refactoring. Open
while($row = $dbc->fetch_row($posR)){
$d = $row[0]."-".str_pad($row[1],2,'0',STR_PAD_LEFT)."-".str_pad($row[2],2,'0',STR_PAD_LEFT);
if (!isset($dailies[$d])) $dailies[$d] = array(0,0);
$dailies[$d][1] = $row[3];
}
- 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 137.
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 function get_resultID_view()
{
$table = $this->config->get('TRANS_DB') . $this->connection->sep() . 'PaycardTransactions';
$prep = $this->connection->prepare("SELECT * FROM {$table} WHERE storeRowID=? and dateID=?");
$row = $this->connection->getRow($prep, array($this->resultID, date('Ymd')));
- 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 137.
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