fannie/modules/plugins2.0/ShelfAudit/SaOrderingPage.php
Function body_content
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
Open
function body_content(){
ob_start();
$elem = '#upc_in';
$this->add_onload_command('$(\'#upc_in\').focus();');
?>
- 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
Method body_content
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function body_content(){
ob_start();
$elem = '#upc_in';
$this->add_onload_command('$(\'#upc_in\').focus();');
?>
Method preprocess
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function preprocess()
{
global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB, $FANNIE_URL, $FANNIE_TRANS_DB;
//$this->addScript($FANNIE_URL.'src/javascript/jquery.js');
File SaOrderingPage.php
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
Function preprocess
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
public function preprocess()
{
global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB, $FANNIE_URL, $FANNIE_TRANS_DB;
//$this->addScript($FANNIE_URL.'src/javascript/jquery.js');
- 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
Method javascript_content
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function javascript_content(){
ob_start();
?>
function paint_focus(elem){
if (elem == 'upc_in'){
Method css_content
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function css_content(){
ob_start();
?>
.saleInfo {
color: green;