CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

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

    protected function post_id_handler()
    {
        // forcing sequential requests here
        $_SESSION['appendingOrder'] = true;

Severity: Major
Found in fannie/modules/plugins2.0/RP/RpDualPage.php - About 2 hrs to fix

    Method skipDates has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function skipDates($upc, $created, $sold, $storeID=false)
        {
            if ($created <= 0 && $sold <= 0) {
                return false;
            }
    Severity: Major
    Found in fannie/modules/plugins2.0/InstaCart/InstaFileV3.php - About 2 hrs to fix

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

          protected function post_id_handler()
          {
              // forcing sequential requests here
              $_SESSION['appendingOrder'] = true;
      
      
      Severity: Major
      Found in fannie/modules/plugins2.0/RP/RpOrderPage.php - About 2 hrs to fix

        Method get_view has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function get_view()
            {
                $store = FormLib::get('store', false);
                if (!$store) {
                    $store = COREPOS\Fannie\API\lib\Store::getIdByIp();
        Severity: Major
        Found in fannie/modules/plugins2.0/RP/RpInternalUse.php - About 2 hrs to fix

          Method processMail has 62 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function processMail($msg)
              {
                  $info = $this->parseEmail($msg);
                  $boundary = $this->hasAttachments($info['headers']);
                  $dbc = \FannieDB::get(\FannieConfig::config('OP_DB'));
          Severity: Major
          Found in fannie/modules/plugins2.0/USFoodsInvoiceGrabber/USFoodsMailPipe.php - About 2 hrs to fix

            Method put_view has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function put_view()
                {
                    $stores = FormLib::storePicker('store', false);
                    $res = $this->connection->query('
                        SELECT v.vendorID, v.vendorName
            Severity: Major
            Found in fannie/purchasing/PurchasingIndexPage.php - About 2 hrs to fix

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

                  protected function get_id_view()
                  {
                      $pager = FormLib::get('pager', '');
              
                      $query = 'SELECT p.orderID, p.vendorID, MIN(creationDate) as creationDate,
              Severity: Major
              Found in fannie/purchasing/VendorPoPage.php - About 2 hrs to fix

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

                    public function fetch_report_data()
                    {
                        $dbc = $this->connection;
                        $dbc->selectDB($this->config->get('OP_DB'));
                
                
                Severity: Major
                Found in fannie/mem/TargetMailList.php - About 2 hrs to fix

                  Method preprocess has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function preprocess()
                      {
                          global $FANNIE_OP_DB;
                          $dbc = FannieDB::get($this->config->get('OP_DB'));
                          $FANNIE_EMP_NO = $this->config->get('EMP_NO');
                  Severity: Major
                  Found in fannie/mem/correction_pages/PatronageTransferTool.php - About 2 hrs to fix

                    File MemArEquityDumpTool.php has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /*******************************************************************************
                    
                        Copyright 2010,2013 Whole Foods Co-op, Duluth, MN
                    
                    
                    Severity: Minor
                    Found in fannie/mem/correction_pages/MemArEquityDumpTool.php - About 2 hrs to fix

                      Method get_date1_date2_handler has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function get_date1_date2_handler()
                          {
                              $dbc = FannieDB::get($this->config->get('OP_DB'));
                              $dlog = DTransactionsModel::selectDlog($this->date1, $this->date2);
                              $dtrans = DTransactionsModel::selectDtrans($this->date1, $this->date2);
                      Severity: Major
                      Found in fannie/item/OpenRingReceipts.php - About 2 hrs to fix

                        File BsonBinaryWriter.cs has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        using System;
                        using System.Globalization;
                        using System.IO;
                        using System.Text;
                        using Newtonsoft.Json.Utilities;

                          Method ParsePostValue has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private bool ParsePostValue()
                                  {
                                      while (true)
                                      {
                                          char currentChar = _chars[_charPos];

                            Method ResolvePropertyAndCreatorValues has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    private IDictionary<JsonProperty, object> ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType, out IDictionary<string, object> extensionData)
                                    {
                                        extensionData = (contract.ExtensionDataSetter != null) ? new Dictionary<string, object>() : null;
                            
                                        IDictionary<JsonProperty, object> propertyValues = new Dictionary<JsonProperty, object>();

                              Identical blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  protected List<Point> SigDataToPoints(string data)
                                  {
                                      char[] comma = new char[]{','};
                                      char[] colon = new char[]{':'};
                                      var pairs = from pair in data.Split(colon) 
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_EMVX.cs on lines 819..830
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_Gen2.cs on lines 934..945

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 178.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  protected List<Point> SigDataToPoints(string data)
                                  {
                                      char[] comma = new char[]{','};
                                      char[] colon = new char[]{':'};
                                      var pairs = from pair in data.Split(colon) 
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_EMVX.cs on lines 819..830
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_PDCX.cs on lines 489..500

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 178.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  protected List<Point> SigDataToPoints(string data)
                                  {
                                      char[] comma = new char[]{','};
                                      char[] colon = new char[]{':'};
                                      var pairs = from pair in data.Split(colon) 
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_Gen2.cs on lines 934..945
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_PDCX.cs on lines 489..500

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 178.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              File CalendarControl.js has 269 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              function positionInfo(object) {
                              
                                var p_elm = object;
                              
                                this.getElementLeft = getElementLeft;
                              Severity: Minor
                              Found in fannie/modules/plugins2.0/CoopCred/programs/CalendarControl.js - About 2 hrs to fix

                                File ManufacturerMovementReport.php has 269 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                /*******************************************************************************
                                
                                    Copyright 2012 Whole Foods Co-op
                                
                                
                                Severity: Minor
                                Found in fannie/reports/ManufacturerMovement/ManufacturerMovementReport.php - About 2 hrs to fix

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                          $('.dept'+deptID).each(function(){
                                              pArray.push($(this).find('.newprice').val());
                                              uArray.push($(this).find('.itemupc').val());
                                          });
                                  Severity: Major
                                  Found in fannie/item/marginTool.js and 1 other location - About 2 hrs to fix
                                  fannie/item/marginTool.js on lines 88..91

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 84.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language