Showing 6,416 of 8,296 total issues
File MercuryDC.php
has 790 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use COREPOS\pos\lib\Database;
use COREPOS\pos\lib\ReceiptLib;
use COREPOS\pos\lib\TransRecord;
Method fetch_report_data
has 373 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
Method getTable
has 371 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTable()
{
$this->addScript('pricing-batch-II.js');
$dbc = $this->connection;
$dbc->selectDB($this->config->OP_DB);
File ReflectionUtils.cs
has 781 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
using System.Numerics;
#endif
Function outputPDF
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
function outputPDF(){
global $FANNIE_PLUGIN_SETTINGS;
$dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['OverShortDatabase']);
$start = FormLib::get_form_value('startDate');
$end = FormLib::get_form_value('endDate');
- 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 ajax_save_program
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
private function ajax_save_program(){
global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['CoopCredDatabase']);
- 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 displayUI
has 359 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayUI($dateStr, $store){
global $FANNIE_PLUGIN_SETTINGS;
$dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['OverShortDatabase']);
$startDate = $dateStr;
Method ajax_save_program
has 359 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function ajax_save_program(){
global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['CoopCredDatabase']);
File ItemEditorPage.php
has 765 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Community Co-op
Method body_content
has 355 lines of code (exceeds 25 allowed). Consider refactoring. Open
function body_content()
{
include('../config.php');
ob_start();
File ProdLocationEditor.php
has 758 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Community Co-op
Method get_orderID_customer_handler
has 347 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_orderID_customer_handler()
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
$TRANS = $this->config->get('TRANS_DB') . $dbc->sep();
File MovementTagTracker.php
has 740 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2015 Whole Foods Co-op
Function showBatchDisplay
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
protected function showBatchDisplay($id, $order='natural')
{
global $FANNIE_SERVER_DBMS,$FANNIE_URL;
$dbc = $this->connection;
$uid = getUID($this->current_user);
- 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
Class JsonWriter
has 90 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class JsonWriter : IDisposable
{
internal enum State
{
Start = 0,
File JValue.cs
has 733 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Utilities;
using System.Globalization;
#if !(NET35 || NET20 || PORTABLE40)
Function check
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
function check($str)
{
if ($str == "TERMMANUAL") {
UdpComm::udpSend("termManual");
$this->session->set("paycard_keyed", true);
- 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 338 lines of code (exceeds 25 allowed). Consider refactoring. Open
function body_content()
{
include(dirname(__FILE__) . '/../config.php');
// set a default if needed
if (!isset($FANNIE_PRODUCT_MODULES) || !is_array($FANNIE_PRODUCT_MODULES) || count($FANNIE_PRODUCT_MODULES) === 0) {
Method fetch_report_data
has 333 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch_report_data()
{
$class_lib = $this->class_lib;
$dbc = $class_lib::getDB();
File HouseCouponEditor.php
has 721 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2012 Whole Foods Co-op