Showing 8,683 of 8,684 total issues
Method WFC_New_MEAT_14UP
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function WFC_New_MEAT_14UP($data,$offset=0,$showPrice=0)
{
$dbc = FannieDB::get(FannieConfig::config('OP_DB'));
$pdf = new WFC_New_MEAT_14UP_PDF('L','mm','Letter');
$pdf->AddPage();
Method WFC_MEAT_SN_14UP
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function WFC_MEAT_SN_14UP($data,$offset=0,$showPrice=0)
{
$dbc = FannieDB::get(FannieConfig::config('OP_DB'));
$pdf = new WFC_MEAT_SN_14UP_PDF('L','mm','Letter');
$pdf->AddPage();
Method WFC_Bulk_Repack_14UP
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function WFC_Bulk_Repack_14UP($data,$offset=0,$showPrice=0)
{
$dbc = FannieDB::get(FannieConfig::config('OP_DB'));
$pdf = new WFC_Bulk_Repack_14UP_PDF('L','mm','Letter');
$pdf->AddPage();
Method get_date1_date2_handler
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_date1_date2_handler()
{
$date1 = date('Y-m-d', strtotime(FormLib::get('date1')));
$date2 = date('Y-m-d', strtotime(FormLib::get('date2')));
$args = array(FormLib::get('store'), $date1, $date2);
Method get_date1_date2_handler
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_date1_date2_handler()
{
$date1 = date('Y-m-d', strtotime(FormLib::get('date1')));
$date2 = date('Y-m-d', strtotime(FormLib::get('date2')));
$args = array(FormLib::get('store'), $date1, $date2);
Method post_segID_store_handler
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function post_segID_store_handler()
{
$json = array('err' => false, 'msg' => '');
$days = FormLib::get('day', array());
Method preprocess
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function preprocess(){
global $FANNIE_URL,$FANNIE_PLUGIN_LIST,$FANNIE_PLUGIN_SETTINGS;
if (!isset($FANNIE_PLUGIN_LIST) || !in_array('CoopCred', $FANNIE_PLUGIN_LIST)) {
$this->errors[] = "The Coop Cred plugin is not enabled.";
Method run
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
if (!class_exists('Automattic\WooCommerce\Client')) {
$this->cronMsg('Library missing. Use composer to install automattic/woocommerce');
return false;
Method run
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$settings = $this->config->get('PLUGIN_SETTINGS');
$url = $settings['CpwPriceURL'];
$mode = $settings['CpwCostUpdates'];
Method body_content
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function body_content()
{
$ret = '';
$list = FormLib::get('l');
Method post_handler
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function post_handler()
{
$this->data = array();
$this->invoice = array();
$invoice = FormLib::get('invoice');
Method showEditForm
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function showEditForm($upc, $display_mode=1, $expand_mode=1)
{
$upc = BarcodeLib::padUPC($upc);
$dbc = $this->db();
$listP = $dbc->prepare('SELECT i.vendorID, v.vendorName, i.sku, i.units, i.description, i.cost
Method ApplySerializerSettings
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static void ApplySerializerSettings(JsonSerializer serializer, JsonSerializerSettings settings)
{
if (!CollectionUtils.IsNullOrEmpty(settings.Converters))
{
// insert settings converters at the beginning so they take precedence
Method ParseConstructor
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void ParseConstructor()
{
if (MatchValueWithTrailingSeparator("new"))
{
EatWhitespace(false);
Function ajax
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function ajax()
{
if ($this->session->get('CashierNo') === '') { // session is missing/invalid
return array(
'main_frame' => MiscLib::baseURL() . 'login.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 magtekBlock
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function magtekBlock($str, $ret)
{
$parts = explode("|",$str);
$tr1 = False;
$tr2 = 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 handleResponseAuth
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function handleResponseAuth($authResult)
{
$resp = $this->desoapify("CreditTransactionResult",
$authResult["response"]);
$xml = new XmlData($resp);
- 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 20 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
$this->conf = new PaycardConf();
$choice = FormLib::get('selectlist', false);
if ($choice !== 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 preprocess
has a Cognitive Complexity of 20 (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 20 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
$this->boxColor = "coloredArea";
$this->msg = _("Undo transaction");
- 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"