Showing 8,683 of 8,684 total issues
Method TryConvertInternal
has a Cognitive Complexity of 42 (exceeds 20 allowed). Consider refactoring. Open
private static ConvertResult TryConvertInternal(object initialValue, CultureInfo culture, Type targetType, out object value)
{
if (initialValue == null)
throw new ArgumentNullException("initialValue");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Identical blocks of code found in 3 locations. Consider refactoring. Open
function saveChangeOrder(){
var ret = '';
$('.denom').each(function(){
var denom = $(this).val();
var elem = document.getElementById('changeOrder'+denom);
- 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 113.
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
function saveChangeOrder(){
var ret = '';
$('.denom').each(function(){
var denom = $(this).val();
var elem = document.getElementById('changeOrder'+denom);
- 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 113.
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
function saveChangeOrder(){
var ret = '';
$('.denom').each(function(){
var denom = $(this).val();
var elem = document.getElementById('changeOrder'+denom);
- 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 113.
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 Fannie_Standard_PDF extends FpdfWithBarcode
{
function barcodeText($x, $y, $h, $barcode, $len)
{
$this->SetFont('Arial','',9);
- 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 160.
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 Zebra_Single_Label_PDF extends FpdfWithBarcode
{
function barcodeText($x, $y, $h, $barcode, $len)
{
$this->SetFont('Arial','',9);
- 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 160.
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 YPSI_rev_001_PDF extends FpdfWithBarcode
{
function barcodeText($x, $y, $h, $barcode, $len)
{
$this->SetFont('Arial','',9);
- 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 160.
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 qlEdit
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
var qlEdit = (function () {
var mod = {};
/** Vue instance
Method fetch_report_data
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$dbc = $this->connection;
try {
$supers = $this->form->super;
Method fetch_report_data
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fetch_report_data()
{
$super = FormLib::get('super', null);
$dept1 = FormLib::get('deptStart', null);
$dept2 = FormLib::get('deptEnd', null);
Method generateSquareTagsTag
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateSquareTagsTag($x, $y, $guide, $width, $height, $pdf, $row, $dbc)
{
$upc = $row['upc'];
$desc = $row['description'];
$showPrice = FormLib::get('showPrice', false);
Method get_id_view
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
if (!$this->invoice) {
return '<div class="alert alert-danger">Invoice not found</div>' . $this->get_view();
}
File taxonly.php
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use COREPOS\Fannie\API\item\StandardAccounting;
//header('Content-Type: application/ms-excel');
//header('Content-Disposition: attachment; filename="EOMreport.xls"');
include('../../../../config.php');
Method getItemData
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getItemData($arr)
{
$ret = '';
/**
Convert balance to a more useful format.
Method sendVoid
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function sendVoid()
{
// initialize
$dbTrans = PaycardLib::paycard_db();
if (!$dbTrans) {
Method fetch_report_data
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
global $FANNIE_OP_DB, $FANNIE_ARCHIVE_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
try {
Method generateHerbNspiceFlatLabel
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateHerbNspiceFlatLabel($x, $y, $guide, $width, $height, $pdf, $row, $dbc, $showPrice, $offset, $tagNo)
{
$pdf->SetFont('Gill','', 16);
define('FPDF_FONTPATH', __DIR__. '/../../../modules/plugins2.0/CoopDealsSigns/noauto/fonts/');
$signage = new COREPOS\Fannie\API\item\FannieSignage(array());
Method get_id_view
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view(){
global $FANNIE_TRANS_DB,$FANNIE_URL;
$table = DTransactionsModel::selectDlog($this->__models['start'],$this->__models['end']);
$my = date('Ym',strtotime($this->__models['start']));
Method process_file
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process_file($linedata, $indexes)
{
$getStoreP = $this->connection->prepare("SELECT posID FROM LbmxStores WHERE lbmxID=?");
$getVendorP = $this->connection->prepare("SELECT posID FROM LbmxVendors WHERE lbmxID=?");
$getPoP = $this->connection->prepare("SELECT orderID FROM PurchaseOrder WHERE storeID=? AND vendorID=? AND vendorInvoiceID=?");
Method getTotals
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getTotals($date1, $date2, $store)
{
$settings = $this->config->get('PLUGIN_SETTINGS');
$dbc = $this->connection;
$dbc->selectDB($settings['OverShortDatabase']);