CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

File TsWagesReport.php has 255 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
include(dirname(__FILE__).'/../../../config.php');
if (!class_exists('FannieAPI')) {
    include_once(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
}
Severity: Minor
Found in fannie/modules/plugins2.0/TimesheetPlugin/TsWagesReport.php - About 2 hrs to fix

    Method get_searchVendor_handler has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function get_searchVendor_handler()
        {
            $query = "SELECT * FROM vendorItems WHERE (description LIKE ? OR brand LIKE ?)";
            $args = array('%' . $this->searchVendor . '%', '%' . $this->searchVendor . '%');
            if (FormLib::get('vendorID')) {
    Severity: Major
    Found in fannie/modules/plugins2.0/RP/RpDualPage.php - About 2 hrs to fix

      Method get_searchVendor_handler has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function get_searchVendor_handler()
          {
              $query = "SELECT * FROM vendorItems WHERE (description LIKE ? OR brand LIKE ?)";
              $args = array('%' . $this->searchVendor . '%', '%' . $this->searchVendor . '%');
              if (FormLib::get('vendorID')) {
      Severity: Major
      Found in fannie/modules/plugins2.0/RP/RpOrderPage.php - About 2 hrs to fix

        Method run has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function run()
            {
                $settings = $this->config->PLUGIN_SETTINGS;
                $dbc = FannieDB::get($settings['TargetedPromosDB']);
        
        

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

              public function fetch_report_data()
              {
                  try {
                      $month = $this->form->month;
                      $year = $this->form->year;

            Method run has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function run($args=array())
                {
                    $ret = array();
                    if (!property_exists($args, 'type')) {
                        // missing required arguments
            Severity: Major
            Found in fannie/classlib2.0/webservices/FannieItemInfo.php - About 2 hrs to fix

              Method pullTable has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  static public function pullTable($table,$db='trans',$truncate=self::TRUNCATE_SOURCE)
                  {
                      $config = \FannieConfig::factory();
                      $op_db = $config->get('OP_DB');
                      $trans_db = $config->get('TRANS_DB');
              Severity: Major
              Found in fannie/classlib2.0/data/SyncLanes.php - About 2 hrs to fix

                Method normalizeLog has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function normalizeLog($view_name, $table_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                    {
                        printf("%s view: %s",
                            ($mode==BasicModel::NORMALIZE_MODE_CHECK)?"Would recreate":"Recreating", 
                            "$view_name (of table $table_name)\n"
                Severity: Major
                Found in fannie/classlib2.0/data/models/trans/DTransactionsModel.php - About 2 hrs to fix

                  Method drawPDF has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function drawPDF()
                      {
                          $pdf = new \FPDF('P', 'mm', 'Letter');
                          $pdf = $this->loadPluginFonts($pdf);
                  
                  
                  Severity: Major
                  Found in fannie/classlib2.0/item/signage/RailSigns4x8P.php - About 2 hrs to fix

                    Method addUPC has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function addUPC($orderID,$memNum,$upc,$num_cases=1)
                    {
                        global $FANNIE_OP_DB,$TRANS;
                        $dbc = FannieDB::get($FANNIE_OP_DB);
                    
                    
                    Severity: Major
                    Found in fannie/ordering/ajax-calls.php - About 2 hrs to fix

                      Method post_id_handler has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function post_id_handler()
                          {
                              global $FANNIE_OP_DB;
                              $dbc = FannieDB::get($FANNIE_OP_DB);
                              $scale = new ServiceScalesModel($dbc);
                      Severity: Major
                      Found in fannie/item/hobartcsv/ScaleEditor.php - About 2 hrs to fix

                        Method get_id_print_handler has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function get_id_print_handler()
                            {
                                $store = COREPOS\Fannie\API\lib\Store::getIdByIp();
                                $mtLength = $store == 1 ? 3 : 7;
                        
                        
                        Severity: Major
                        Found in fannie/item/vendors/DeliVendorAliasPage.php - About 2 hrs to fix

                          File UnitBreakdownPage.php has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /*******************************************************************************
                          
                              Copyright 2014 Foods Co-op
                          
                          
                          Severity: Minor
                          Found in fannie/item/vendors/UnitBreakdownPage.php - About 2 hrs to fix

                            Method get_list_view has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function get_list_view()
                                {
                                    global $FANNIE_OP_DB;
                                    $dbc = FannieDB::get($FANNIE_OP_DB);
                            
                            
                            Severity: Major
                            Found in fannie/item/ProdReviewPage.php - About 2 hrs to fix

                              Method get_id_view has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function get_id_view()
                                  {
                                      $ret = $this->get_view();
                                      $standard = FormLib::get('via', 0);
                                      $ret .= sprintf('<h3>Cutoff: %.2f%% %s</h3>', $this->id, $standard ? 'Case' : 'Item');
                              Severity: Major
                              Found in fannie/item/MovementTagCheck.php - About 2 hrs to fix

                                File JsonContract.cs has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                using System;
                                using System.Collections;
                                using System.Collections.Generic;
                                using System.Reflection;
                                using System.Runtime.Serialization;

                                  File JTokenWriter.cs has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  using System;
                                  using System.Globalization;
                                  #if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
                                  using System.Numerics;
                                  #endif

                                    Method ParseZone has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            private bool ParseZone(int start)
                                            {
                                                if (start < _length)
                                                {
                                                    char ch = _text[start];

                                      Method ReadThread has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              unsafe void ReadThread()
                                              {
                                                  if (!HandleAcquire()) { return; }
                                                  
                                                  try

                                        Method GetJsonSchemaType has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                private JsonSchemaType GetJsonSchemaType(Type type, Required valueRequired)
                                                {
                                                    JsonSchemaType schemaType = JsonSchemaType.None;
                                                    if (valueRequired != Required.Always && ReflectionUtils.IsNullable(type))
                                                    {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language