File RenderReceiptPage.php
has 359 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');
}
Method receiptHeader
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function receiptHeader($date,$trans)
{
$totime = strtotime($date);
list($emp_no, $reg_no, $trans_no) = explode('-', $trans, 3);
$store = FormLib::get('store', false);
Method ccInfo
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ccInfo($date1, $transNum)
{
$dbc = $this->connection;
$dateInt = str_replace("-","",$date1);
list($emp,$reg,$trans) = explode("-", $transNum, 3);
Method receipt_to_table
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function receipt_to_table($query,$args,$border,$bgcolor)
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('TRANS_DB'));
$prep = $dbc->prepare($query);
Method get_view
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_view()
{
$ret = $this->changeReceiptForm();
$date1 = $this->getReceiptDate($this->form);
try {
Function ccInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function ccInfo($date1, $transNum)
{
$dbc = $this->connection;
$dateInt = str_replace("-","",$date1);
list($emp,$reg,$trans) = explode("-", $transNum, 3);
- 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 receipt_to_table
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function receipt_to_table($query,$args,$border,$bgcolor)
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('TRANS_DB'));
$prep = $dbc->prepare($query);
- 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 get_view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function get_view()
{
$ret = $this->changeReceiptForm();
$date1 = $this->getReceiptDate($this->form);
try {
- 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"