CORE-POS/IS4C

View on GitHub

Showing 6,416 of 8,296 total issues

File RpDualPage.php has 866 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

include(__DIR__ . '/../../../config.php');
if (!class_exists('FannieAPI')) {
    include(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
Severity: Major
Found in fannie/modules/plugins2.0/RP/RpDualPage.php - About 2 days to fix

    Function orderView has 413 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var orderView = (function($) {
        var mod = {};
        var forceUPC = true;
    
        mod.forceUPC = function(f) {
    Severity: Major
    Found in fannie/ordering/orderview.js - About 2 days to fix

      File ObfWeeklyReportV2.php has 847 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /*******************************************************************************
      
          Copyright 2014 Whole Foods Co-op
      
      
      Severity: Major
      Found in fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php - About 2 days to fix

        Method fetch_report_data has 405 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function fetch_report_data()
            {
                $class_lib = $this->class_lib;
                $dbc = $class_lib::getDB();
                
        Severity: Major
        Found in fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php - About 2 days to fix

          Method getValue has 402 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getValue($coupID)
              {
                  $infoW = $this->lookupCoupon($coupID);
                  if ($infoW === false) {
                      return array('value' => 0, 'department' => 0, 'description' => '');
          Severity: Major
          Found in pos/is4c-nf/lib/Scanning/SpecialUPCs/HouseCoupon.php - About 2 days to fix

            File AlertIncident.php has 832 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            use COREPOS\Fannie\Plugin\IncidentTracker\notifiers\Email;
            use COREPOS\Fannie\Plugin\IncidentTracker\notifiers\Basecamp;
            
            
            Severity: Major
            Found in fannie/modules/plugins2.0/IncidentTracker/AlertIncident.php - About 2 days to fix

              File JContainer.cs has 831 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              using System;
              using System.Collections.Generic;
              #if !PORTABLE40
              using System.Collections.Specialized;
              #endif

                File SPH_IngenicoRBA_Common.cs has 830 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using System;
                using System.IO.Ports;
                using System.Threading;
                using System.Collections;
                using System.Collections.Generic;

                  Function get_data has a Cognitive Complexity of 99 (exceeds 5 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');
                  Severity: Minor
                  Found in fannie/modules/plugins2.0/OverShortTools/OverShortMAS.php - About 1 day to fix

                  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 RpOrderPage.php has 829 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  include(__DIR__ . '/../../../config.php');
                  if (!class_exists('FannieAPI')) {
                      include(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
                  Severity: Major
                  Found in fannie/modules/plugins2.0/RP/RpOrderPage.php - About 1 day to fix

                    File AdvancedItemSearch.php has 826 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /*******************************************************************************
                    
                        Copyright 2013 Whole Foods Community Co-op
                    
                    
                    Severity: Major
                    Found in fannie/item/AdvancedItemSearch.php - About 1 day to fix

                      File JsonSerializerInternalWriter.cs has 819 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      using System;
                      using System.Collections;
                      using System.Collections.Generic;
                      using System.ComponentModel;
                      #if !(NET35 || NET20 || PORTABLE40)

                        File MercuryE2E.php has 818 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /*******************************************************************************
                        
                            Copyright 2012 Whole Foods Co-op
                        
                        
                        Severity: Major
                        Found in pos/is4c-nf/plugins/Paycards/MercuryE2E.php - About 1 day to fix

                          Function run has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function run()
                              {
                                  global $FANNIE_OP_DB;
                                  $dbc = FannieDB::get($FANNIE_OP_DB);
                                  $now = date('Y-m-d 00:00:00');
                          Severity: Minor
                          Found in fannie/cron/tasks/SalesBatchTask.php - About 1 day to fix

                          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 body_content has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
                          Open

                              function body_content()
                              {
                                  global $FANNIE_OP_DB, $FANNIE_PLUGIN_SETTINGS;
                                  $ts_db = FannieDB::get($FANNIE_PLUGIN_SETTINGS['TimesheetDatabase']);
                          
                          
                          Severity: Minor
                          Found in fannie/modules/plugins2.0/TimesheetPlugin/PayrollSummaryPage.php - About 1 day to fix

                          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 VPBPIII.php has 807 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /*******************************************************************************
                          
                              Copyright 2010 Whole Foods Co-op
                          
                          
                          Severity: Major
                          Found in fannie/batches/UNFI/VPBPIII.php - About 1 day to fix

                            SQLManager has 100 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class SQLManager 
                            {
                                /**
                                 Logging object (PSR-3)
                                */
                            Severity: Major
                            Found in common/SQLManager.php - About 1 day to fix

                              Method WFC_Hybrid has 381 lines of code (exceeds 25 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"));
                              Severity: Major
                              Found in fannie/admin/labels/pdf_layouts/WFC_Hybrid.php - About 1 day to fix

                                File InstallIndexPage.php has 800 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                /*******************************************************************************
                                
                                    Copyright 2011 Whole Foods Co-op
                                
                                
                                Severity: Major
                                Found in fannie/install/InstallIndexPage.php - About 1 day to fix

                                  File HouseCoupon.php has 797 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  <?php
                                  /*******************************************************************************
                                  
                                      Copyright 2010 Whole Foods Co-op
                                  
                                  
                                  Severity: Major
                                  Found in pos/is4c-nf/lib/Scanning/SpecialUPCs/HouseCoupon.php - About 1 day to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language