Showing 8,683 of 8,684 total issues
Method getNewPars
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getNewPars($dbc, $vendorID, $deptID, $storeID, $json)
{
$dlog = FannieConfig::config('TRANS_DB') . $dbc->sep() . 'dlog_15';
$today = date('Y-m-d 00:00:00');
Method drawPDF
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drawPDF()
{
$pdf = new \FPDF('L', 'mm', 'Letter');
$pdf->SetMargins(3.175, 3.175, 3.175);
$pdf->SetAutoPageBreak(false);
Method getItemByUPC
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function getItemByUPC($upc)
{
$dbc = self::dbc();
$upc = BarcodeLib::padUPC($upc);
Method exportAll
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function exportAll($store)
{
$promoP = $this->connection->prepare('
SELECT q.upc, SUM(total), SUM(saleTotal)
FROM ' . FannieDB::fqn('productWeeklyLastQuarter', 'arch') . ' as q
Method preprocess
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function preprocess()
{
$stores = FormLib::storePicker('store', false);
$items = FormLib::get('items', 50);
$vendors = FormLib::get('vendors', 10);
Method get_view
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_view()
{
$this->addScript('nutrifacts.js');
$ret = <<<HTML
<form method="post" target="_blank">
Method ToString
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static string ToString(object value)
{
if (value == null)
return Null;
File AutoLoader.php
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2012 Whole Foods Co-op
File PatronageOverDatesReport.php
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
Copyright 2015 West End Food Co-op, Toronto
File addShelfTag.php
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2009 Whole Foods Co-op
Function preprocess
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
// get calling class (required)
$item = FormLib::get('item');
$pos_home = MiscLib::base_url().'gui-modules/pos2.php';
- 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
Function preprocess
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
$this->conf = new PaycardConf();
$this->bmpPath = $this->page_url . 'scale-drivers/drivers/NewMagellan/ss-output/tmp/';
$this->capture = new SigCapture($this->conf);
- 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
Function preprocess
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
// check for posts before drawing anything, so we can redirect
if (FormLib::get('reginput', false) !== false) {
$input = strtoupper(trim(FormLib::get('reginput')));
- 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
Function preprocess
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
// check for posts before drawing anything, so we can redirect
if (FormLib::get('mode') !== '') {
$this->mode = FormLib::get('mode');
- 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
Function handleResponseAuth
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function handleResponseAuth($authResult)
{
$xml = new XmlData($authResult['response']);
$dbTrans = PaycardLib::paycard_db();
- 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
Function check
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function check($str)
{
if ($this->session->get('store') !== 'wfc') {
return false;
}
- 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
Function body_content
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function body_content()
{
$num_rows = $this->temp_num_rows;
$result = $this->temp_result;
$entered = $this->entered;
- 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
Function preprocess
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
$this->bmpPath = $this->page_url . 'scale-drivers/drivers/NewMagellan/ss-output/tmp/';
$terminalMsg = 'termSig';
- 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
Function reverseTransaction
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function reverseTransaction($empNo, $registerNo, $transNo)
{
/* change the cashier to the original transaction's cashier */
CoreLocal::set("CashierNo",$empNo);
CoreLocal::set("transno",Database::gettransno($empNo));
- 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
Function addLinesNearField
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function addLinesNearField(array $items, array $lines, $field)
{
foreach ($lines as $line) {
if ($line['total'] == 0) {
continue;
- 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"