Showing 6,416 of 8,296 total issues
File FannieSignage.php
has 1134 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2014 Whole Foods Co-op, Duluth, MN
File SQLManager.php
has 1127 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2009 Whole Foods Co-op
Function preprocess
has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring. Open
public function preprocess()
{
$col_select = \FormLib::get_form_value('cs','');
$this->finishPreviewOpts();
- 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
File BasicModel.php
has 1106 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
Method get_view
has 554 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_view()
{
$this->addScript('rpDirect.js?date=20200708');
$this->addOnloadCommand('rpOrder.initAutoCompletes();');
$store = FormLib::get('store');
Function get_id_view
has a Cognitive Complexity of 136 (exceeds 5 allowed). Consider refactoring. Open
public function get_id_view()
{
$ret = '';
$ret .= '
- 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
File ObfWeeklyReport.php
has 1067 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2014 Whole Foods Co-op
Method get_data
has 524 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_data(){
global $FANNIE_OP_DB;
$dlog = DTransactionsModel::selectDlog($this->startDate, $this->endDate);
$dtrans = DTransactionsModel::selectDtrans($this->startDate, $this->endDate);
$mc = FormLib::get('mercato');
File JsonWriter.cs
has 1038 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using System.IO;
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
Method get_view
has 520 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_view()
{
$this->addScript('rpDual.js?date=20230801');
$this->addOnloadCommand('rpOrder.initAutoCompletes();');
$store = FormLib::get('store');
File CoopCredProgramEditor.php
has 1033 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*******************************************************************************
Copyright 2009,2013 Whole Foods Co-op
Copyright 2014 West End Food Co-op, Toronto
Function rpOrder
has 518 lines of code (exceeds 25 allowed). Consider refactoring. Open
var rpOrder = (function ($) {
var mod = {};
var state = {
'retention': 60,
Function get_id_view
has a Cognitive Complexity of 127 (exceeds 5 allowed). Consider refactoring. Open
public function get_id_view()
{
$ret = '';
$ret .= '
- 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 rpOrder
has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring. Open
var rpOrder = (function ($) {
var mod = {};
var state = {
'retention': 60,
- 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 WFC_Hybrid
has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring. Open
function WFC_Hybrid($data,$offset=0){
$pdf=new WFC_Hybrid_PDF('P','mm','Letter'); //start new instance of PDF
$pdf->Open(); //open new PDF Document
$pdf->setTagDate(date("m/d/Y"));
- 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 get_id_view
has 493 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_id_view()
{
$settings = $this->config->get('PLUGIN_SETTINGS');
$prefix = $settings['ObfDatabaseV2'] . $this->connection->sep();
$week = FormLib::get('week');
Function rpOrder
has 490 lines of code (exceeds 25 allowed). Consider refactoring. Open
var rpOrder = (function ($) {
var mod = {};
var state = {
'retention': 60,
Method showEditForm
has 489 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function showEditForm($upc, $display_mode=1, $expand_mode=1)
{
$FANNIE_PRODUCT_MODULES = FannieConfig::config('PRODUCT_MODULES', array());
$upc = BarcodeLib::padUPC($upc);
Method get_view
has 488 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function get_view()
{
$this->addScript('rpOrder.js?date=20210224');
$this->addOnloadCommand('rpOrder.initAutoCompletes();');
$store = FormLib::get('store');
Function weightedAverages
has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring. Open
private function weightedAverages($dbc)
{
// now do weighted averages
$this->cronMsg('Calculating weighted averages', FannieLogger::INFO);
$dbc->query('TRUNCATE TABLE productSummaryLastQuarter');
- 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"