CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

Method helpContent has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function helpContent()
    {
        return '
            <p>
            A payment plan can be assigned to a member to
Severity: Major
Found in fannie/mem/PaymentPlanEditor.php - About 2 hrs to fix

    Method doc has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function doc()
        {
            return '
    Use:
    This is one of two "primary" tables dealing with membership
    Severity: Major
    Found in fannie/classlib2.0/data/models/op/CustdataModel.php - About 2 hrs to fix

      Method helpModal has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function helpModal()
          {
              $help = $this->helpContent();
              if (!$help) {
                  return false;
      Severity: Major
      Found in fannie/classlib2.0/FanniePage.php - About 2 hrs to fix

        Method drawPDF has 55 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/HalfTags4x8P.php - About 2 hrs to fix

          Method post_u_view has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function post_u_view()
              {
                  global $FANNIE_OP_DB, $FANNIE_URL;
                  $this->addScript($FANNIE_URL.'/src/javascript/jquery.js');
                  $this->addCssFile($FANNIE_URL.'/src/style.css');
          Severity: Major
          Found in fannie/item/hobartcsv/SyncFromSearch.php - About 2 hrs to fix

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

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

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

                  protected function get_view()
                  {
                      $query = "
                          SELECT l.likeCode,
                              l.likeCodeDesc,
              Severity: Major
              Found in fannie/item/likecodes/LikeCodeActivity.php - About 2 hrs to fix

                Method BuildImage has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public string BuildImage(string path){
                        List<Point> points = new List<Point>();
                        List<byte> byteList = new List<byte>();
                
                        for(int i=0;i<sig_length;i++){

                  Method CreateList has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private object CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, object existingValue, string id)
                          {
                              object value;
                  
                              if (HasNoDefinedType(contract))

                    Method SerializeObject has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            private void SerializeObject(JsonWriter writer, object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
                            {
                                OnSerializing(writer, contract, value);
                    
                                _serializeStack.Add(value);

                      Method SerializeValue has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private void SerializeValue(JsonWriter writer, object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
                              {
                                  if (value == null)
                                  {
                                      writer.WriteNull();

                        Method ParseData has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private string ParseData(string s)
                            {
                                if (s.Substring(0,2) == "S1") { // scale message
                                    /**
                                      The scale supports two primary commands:

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

                              function ajaxAutoComplete(dstr, callback) {
                                  $.ajax({
                                      type: 'get',
                                      data: dstr,
                                      dataType: 'json'
                          Severity: Major
                          Found in fannie/modules/plugins2.0/RP/rpDirect.js and 2 other locations - About 2 hrs to fix
                          fannie/modules/plugins2.0/RP/rpDual.js on lines 46..56
                          fannie/modules/plugins2.0/RP/rpOrder.js on lines 44..54

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

                          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 2 locations. Consider refactoring.
                          Open

                              mod.vendorFilter = function() {
                                  $('tr.item-row').hide();
                                  $('input.vFilter:checked').each(function () {
                                      $('tr.vendor-' + $(this).val()).show();
                                  });
                          Severity: Major
                          Found in fannie/modules/plugins2.0/RP/rpDual.js and 1 other location - About 2 hrs to fix
                          fannie/modules/plugins2.0/RP/rpOrder.js on lines 476..481

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

                          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 2 locations. Consider refactoring.
                          Open

                              mod.vendorFilter = function() {
                                  $('tr.item-row').hide();
                                  $('input.vFilter:checked').each(function () {
                                      $('tr.vendor-' + $(this).val()).show();
                                  });
                          Severity: Major
                          Found in fannie/modules/plugins2.0/RP/rpOrder.js and 1 other location - About 2 hrs to fix
                          fannie/modules/plugins2.0/RP/rpDual.js on lines 530..535

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

                          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

                              function ajaxAutoComplete(dstr, callback) {
                                  $.ajax({
                                      type: 'get',
                                      data: dstr,
                                      dataType: 'json'
                          Severity: Major
                          Found in fannie/modules/plugins2.0/RP/rpOrder.js and 2 other locations - About 2 hrs to fix
                          fannie/modules/plugins2.0/RP/rpDirect.js on lines 44..54
                          fannie/modules/plugins2.0/RP/rpDual.js on lines 46..56

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

                          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

                              function ajaxAutoComplete(dstr, callback) {
                                  $.ajax({
                                      type: 'get',
                                      data: dstr,
                                      dataType: 'json'
                          Severity: Major
                          Found in fannie/modules/plugins2.0/RP/rpDual.js and 2 other locations - About 2 hrs to fix
                          fannie/modules/plugins2.0/RP/rpDirect.js on lines 44..54
                          fannie/modules/plugins2.0/RP/rpOrder.js on lines 44..54

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

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

                          <?php
                          
                          class USFTask extends FannieTask
                          {
                              public function run()
                          Severity: Minor
                          Found in fannie/modules/plugins2.0/USFoodsInvoiceGrabber/USFTask.php - About 2 hrs to fix

                            File MemArEquitySwapTool.php has 258 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/MemArEquitySwapTool.php - About 2 hrs to fix

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

                                          if ($found_charge) {
                                              $actual = array();
                                              $num=0;
                                              while ($arRows[$card_no][$num]['charges'] == 0) {
                                                  $num++;
                              fannie/modules/plugins2.0/StatementsPlugin/StatementsPluginEmail.php on lines 308..319

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

                              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