Showing 8,683 of 8,684 total issues
Method body_content
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function body_content(){
global $FANNIE_URL, $FANNIE_PLUGIN_SETTINGS;
$dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['OverShortDatabase']);
$this->addScript('js/countV3.js?date=20220927');
$this->addScript($FANNIE_URL.'src/javascript/jquery.js');
Method fetch_report_data
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fetch_report_data()
{
$accounting = $this->config->get('ACCOUNTING_MODULE');
if (!class_exists($accounting)) {
$accounting = '\COREPOS\Fannie\API\item\Accounting';
Method calculateWeek
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function calculateWeek($start)
{
$startTS = strtotime($start);
$end = date('Y-m-d', mktime(0, 0, 0, date('n',$startTS), date('j',$startTS) + 6, date('Y',$startTS)));
echo "Week $start - $end\n";
Method run
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
global $FANNIE_PLUGIN_SETTINGS, $FANNIE_AR_DEPARTMENTS, $FANNIE_TRANS_DB, $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['StaffArPayrollDB']);
Method run
has 65 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 get_view
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_view(){
// comment out WFC scan coord tools if COOP_ID is somewhere else
$wfcTools = ($this->config->get('COOP_ID') != 'WFC_Duluth') ? array('<!--', '-->') : array('', '');
return <<<HTML
<!doctype html>
Method form_content
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function form_content()
{
$ret = '';
$review = FormLib::get('review',False);
Method showEditForm
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showEditForm($memNum, $country="US")
{
$account = self::getAccount();
$ret = "<div class=\"panel panel-default\">
<div class=\"panel-heading\">Household Members</div>
Method get_view
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_view()
{
global $FANNIE_OP_DB;
$dbc = FannieDB::get($FANNIE_OP_DB);
$vendOpts = "<option value=0></option>";
Method get_create_handler
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_create_handler()
{
global $FANNIE_OP_DB;
$local = FannieDB::get($FANNIE_OP_DB);
Method ReadMetadataProperties
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
private bool ReadMetadataProperties(JsonReader reader, ref Type objectType, ref JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue, out object newValue, out string id)
{
id = null;
newValue = null;
Method PopulateObject
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
private object PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
{
OnDeserializing(reader, contract, newObject);
// only need to keep a track of properies presence if they are required or a value should be defaulted if missing
File SPH_Datacap_IPTran.cs
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.IO;
using System.Threading;
using System.Net;
using System.Net.Sockets;
Function baseItem
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
var baseItem = (function() {
var mod = {};
mod.chainSubs = function(store_id) {
chainSubDepartments(
- 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 19 (exceeds 5 allowed). Consider refactoring. Open
function preprocess()
{
// I haven't tracked down the cause but some mechanisms for getting here
// do NOT unset msgrepeat which leads to an approval immediately triggering
// into another ewic 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"
Further reading
Function loadCsvLines
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
static private function loadCsvLines($sql, $table, $path)
{
$loaded = 0;
echo _("line-by-line") . "<br>\n";
$fptr = fopen($path, 'r');
- 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 messageModFooters
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
static private function messageModFooters($receipt, $where, $ref, $reprint, $nth)
{
// check if message mods have data
// and add them to the receipt
$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 scaledisplaymsg
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
static public function scaledisplaymsg($input="")
{
$reginput = trim(strtoupper($input));
$scans = '';
- 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 process_file
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function process_file($linedata, $indexes)
{
$dbc = $this->connection;
$dbc->selectDB($this->config->get('OP_DB'));
$vendorID = $this->getVendorID();
- 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 process_file
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function process_file($linedata, $indexes)
{
$prefix = FormLib::get('prefix');
$start = FormLib::get('start');
$end = FormLib::get('end');
- 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"