CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

File WFC_New_Produce_Mockup.php has 298 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
use COREPOS\Fannie\API\FanniePlugin;
if (!class_exists('FpdfWithBarcode')) {
    include(dirname(__FILE__) . '/../FpdfWithBarcode.php');
}
Severity: Minor
Found in fannie/admin/labels/pdf_layouts/WFC_New_Produce_Mockup.php - About 3 hrs to fix

    File OverShortDepositSlips.php has 298 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /*******************************************************************************
    
        Copyright 2013 Whole Foods Co-op
    
    
    Severity: Minor
    Found in fannie/modules/plugins2.0/OverShortTools/OverShortDepositSlips.php - About 3 hrs to fix

      File index.php has 297 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      use COREPOS\Fannie\API\item\StandardAccounting;
      include('../../../../config.php');
      include(__DIR__ . '/../../../../classlib2.0/FannieAPI.php');
      $dbc = FannieDB::get($FANNIE_OP_DB);
      Severity: Minor
      Found in fannie/reports/Store-Specific/WFC/EOM-Nabs/index.php - About 3 hrs to fix

        Method handleResponseAuth has 78 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function handleResponseAuth($authResult)
            {
                $xml = new XmlData($authResult['response']);
                $dbTrans = PaycardLib::paycard_db();
        
        
        Severity: Major
        Found in pos/is4c-nf/plugins/Paycards/GoEMerchant.php - About 3 hrs to fix

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

              public function fetch_report_data()
              {
                  $dbc = $this->connection;
                  $dbc->selectDB($this->config->get('OP_DB'));
                  $data = array();
          Severity: Major
          Found in fannie/reports/LocalMix/LocalMixReport.php - About 3 hrs to fix

            Method fetch_report_data has 78 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/reports/from-search/PreviousPromos/PreviousPromosReport.php - About 3 hrs to fix

              Method WFC_Aisle_Tags has 78 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function WFC_Aisle_Tags($data,$offset=0){
              
                  $pdf=new WFC_Aisle_Tags_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_Aisle_Tags.php - About 3 hrs to fix

                Method get_date1_date2_view has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function get_date1_date2_view()
                    {
                        $date1 = date('Ymd', strtotime($this->date1));
                        $date2 = date('Ymd', strtotime($this->date2));
                        $skuP = $this->connection->prepare("
                Severity: Major
                Found in fannie/modules/plugins2.0/CoreWarehouse/reports/CwCoEfficient.php - About 3 hrs to fix

                  Method saveFormData has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function saveFormData($memNum, $json=array())
                      {
                          //$dbc = $this->db();
                          global $FANNIE_URL;
                          global $FANNIE_PLUGIN_LIST,$FANNIE_PLUGIN_SETTINGS;
                  Severity: Major
                  Found in fannie/modules/plugins2.0/CoopCred/membership/CoopCredMember.php - About 3 hrs to fix

                    Method form_content has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function form_content() {
                            global $FANNIE_URL;
                    
                            if (!empty($this->errors)) {
                                return "<p style='font-size:1.2em;'>" . $this->errors . "</p>";

                      Method updatePars has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function updatePars($dbc, $vendorID, $deptID, $storeID, $json)
                          {
                              $dlog = FannieConfig::config('TRANS_DB') . $dbc->sep() . 'dlog_15';
                              $today = date('Y-m-d 00:00:00');
                      
                      
                      Severity: Major
                      Found in fannie/classlib2.0/data/ordering/ExponentialLeastSquares.php - About 3 hrs to fix

                        Method duplicateOrder has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function duplicateOrder($old_id,$from='CompleteSpecialOrder')
                        {
                            global $FANNIE_OP_DB,$TRANS, $FANNIE_TRANS_DB;
                            $dbc = FannieDB::get($FANNIE_OP_DB);
                            $new_id = createEmptyOrder();
                        Severity: Major
                        Found in fannie/ordering/ajax-calls.php - About 3 hrs to fix

                          Method searchResults has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function searchResults()
                              {
                                  $authorized = false;
                                  if (FannieAuth::validateUserQuiet('admin')) {
                                      $authorized = true;
                          Severity: Major
                          Found in fannie/item/ItemEditorPage.php - About 3 hrs to fix

                            Method getFormJavascript has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getFormJavascript($upc)
                                {
                                    $FANNIE_URL = FannieConfig::config('URL');
                                    ob_start();
                                    ?>
                            Severity: Major
                            Found in fannie/item/modules/LikeCodeModule.php - About 3 hrs to fix

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

                                  private string ExpandUPCE(string upc)
                                  {
                                      string lead = upc.Substring(0,upc.Length-1);
                                      string tail = upc.Substring(upc.Length-1);
                              
                              
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Magellan_Scale.cs on lines 282..296
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_NCR_Scale.cs on lines 249..263

                              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 217.

                              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

                                  private string ExpandUPCE(string upc)
                                  {
                                      string lead = upc.Substring(0,upc.Length-1);
                                      string tail = upc.Substring(upc.Length-1);
                              
                              
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Magellan_Scale.cs on lines 282..296
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Magellan_ScanOnly.cs on lines 135..149

                              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 217.

                              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

                                  private string ExpandUPCE(string upc)
                                  {
                                      string lead = upc.Substring(0,upc.Length-1);
                                      string tail = upc.Substring(upc.Length-1);
                              
                              
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Magellan_ScanOnly.cs on lines 135..149
                              pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_NCR_Scale.cs on lines 249..263

                              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 217.

                              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

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

                                  public function active()
                                  {
                                      if(func_num_args() == 0) {
                                          return $this->getColumn('active');
                                      } else if (func_num_args() > 1) {
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

                              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 144.

                              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

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

                                  public function transNum()
                                  {
                                      if(func_num_args() == 0) {
                                          return $this->getColumn('transNum');
                                      } else if (func_num_args() > 1) {
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121

                              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 144.

                              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

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

                                  public function cardNo()
                                  {
                                      if(func_num_args() == 0) {
                                          return $this->getColumn('cardNo');
                                      } else if (func_num_args() > 1) {
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
                              fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

                              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 144.

                              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