Showing 8,683 of 8,684 total issues
Method get_id_view
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
$upc = BarcodeLib::padUPC($this->id);
$store = FormLib::get('store', 1);
$info = $this->getMostRecent($upc, $store);
Method ParseComment
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void ParseComment()
{
// should have already parsed / character before reaching this method
_charPos++;
Function programOK
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
static public function programOK($pKey='', $conn='')
{
global $CORE_LOCAL;
if (!$CORE_LOCAL->get("memberID")) {
- 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 loadSampleData
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
static public function loadSampleData($sql, $table, $quiet=false)
{
$success = true;
ob_start();
echo _("Loading") . " `$table` ";
- 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 memReceiptMessages
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
static public function memReceiptMessages($cardNo)
{
$dbc = Database::pDataConnect();
$memQ = 'SELECT msg_text,modifier_module
FROM custReceiptMessage
- 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 standalone_receipt
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function standalone_receipt($ref, $reprint=false)
{
list($emp, $reg, $trans) = ReceiptLib::parseRef($ref);
$dbc = Database::tDataConnect();
- 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 errorCheck
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function errorCheck()
{
//force negative entered value when the total is negative.
if (CoreLocal::get("amtdue") <0 && $this->amount >= 0) {
$this->amount = -1 * $this->amount;
- 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 updateDiscount
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static function updateDiscount(DiscountModule $mod, $doSubtotal=true)
{
$changed = true;
// serialize/unserialize before saving to avoid
// auto-session errors w/ undefined classes
- 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 run
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
$local_dtrans = $FANNIE_TRANS_DB . $dbc->sep() . 'dtransactions';
- 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 fetch_report_data
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function fetch_report_data()
{
global $FANNIE_OP_DB;
/* provide a department range and date range to
get history for all products in those departments
- 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 fetch_report_data
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function fetch_report_data()
{
/* provide a department range and date range to
get history for all products in those departments
for that time period AND current price
- 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 fetch_report_data
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$dbc = $this->connection;
$parts = FormLib::standardItemFromWhere();
$query = $parts['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 generateNewDeliShort_24UPTag
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function generateNewDeliShort_24UPTag($x, $y, $guide, $width, $height, $pdf, $row, $dbc, $showPrice, $showBarcode, $offset)
{
$upc = $row['upc'];
$desc = $row['description'];
$brand = $row['brand'];
- 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 select_to_table2
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function select_to_table2($query,$args,$border,$bgcolor,$width="120",$spacing="0",$padding="0",$headers=array(),$nostart=False)
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_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 confset
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function confset($key, $value)
{
$FILEPATH = realpath(dirname(__FILE__).'/../');
$lines = array();
$found = 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 get_view
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function get_view()
{
$lib_class = $this->lib_class;
$dbc = $lib_class::getDB();
- 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 run
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$settings = $this->config->get('PLUGIN_SETTINGS');
$dbc = FannieDB::get($settings['CommentDB']);
$cmP = $dbc->prepare("SELECT * FROM Comments WHERE categoryID=? AND ccNotified=0");
- 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 fetch_report_data
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$dbc = FannieDB::get('HoursTracking');
// get level info
- 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 show_sheet
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function show_sheet($emp_no, $periodID){
global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB;
$ts_db = FannieDB::get($FANNIE_PLUGIN_SETTINGS['TimesheetDatabase']);
include ('./includes/header.html');
- 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_id_view
has a Cognitive Complexity of 21 (exceeds 5 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']));
- 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"