CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

Method sendAuth has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function sendAuth($domain="w1.mercurypay.com")
    {
        // initialize
        $dbTrans = Database::tDataConnect();
        if (!$dbTrans) {
Severity: Major
Found in pos/is4c-nf/plugins/Paycards/MercuryGift.php - About 3 hrs to fix

    Method createArchive has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function createArchive($name,$db){
        global $FANNIE_SERVER_DBMS, $FANNIE_ARCHIVE_REMOTE,
            $FANNIE_ARCHIVE_DBMS, $FANNIE_ARCHIVE_DB;;
    
        $dbms = $FANNIE_ARCHIVE_REMOTE?$FANNIE_ARCHIVE_DBMS:$FANNIE_SERVER_DBMS;
    Severity: Major
    Found in fannie/cron/nightly.dtrans.php - About 3 hrs to fix

      Method fetch_report_data has 80 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/MarginMovement/MarginMovementReport.php - About 3 hrs to fix

        Method YPSI_rev_001 has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function YPSI_rev_001($data,$offset=0){
            $hspace = 0.79375;
            $h = 29.36875;
            $top = 12.7 + 2.5;
            $left = 4.85 + 1.25;
        Severity: Major
        Found in fannie/admin/labels/pdf_layouts/YPSI_rev_001.php - About 3 hrs to fix

          Method generateMirrorTagServiceCase12 has 80 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function generateMirrorTagServiceCase12($x, $y, $guide, $width, $height, $pdf, $row, $dbc)
          {
              $upc = isset($row['upc']) ? $row['upc'] : '';
              $desc = isset($row['description']) ? $row['description'] : '';
              $size = isset($row['size']) ? $row['size'] : '';
          Severity: Major
          Found in fannie/admin/labels/pdf_layouts/WFC_Dark_ServiceCase_12UP.php - About 3 hrs to fix

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

                public function processMail($msg)
                {
                    if ($this->spamCheck($msg)) {
                        return;
                    }
            Severity: Major
            Found in fannie/modules/plugins2.0/CommentTracker/MailPipe.php - About 3 hrs to fix

              File IllnessLogsPage.php has 300 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: Minor
              Found in fannie/modules/plugins2.0/HrWeb/IllnessLog/IllnessLogsPage.php - About 3 hrs to fix

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

                    public function run()
                    {
                        $status = 'INACT';
                        $id = $this->data['id'];
                        $code = $this->data['code'];
                Severity: Major
                Found in fannie/modules/plugins2.0/Addresses/MarkBadAddress.php - About 3 hrs to fix

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

                      public function run()
                      {
                          $settings = $this->config->get('PLUGIN_SETTINGS');
                          $msg = '';
                          if (!isset($settings['ReportMetricsEmail'])) {
                  Severity: Major
                  Found in fannie/modules/plugins2.0/ReportMetrics/ReportMetricsTask.php - About 3 hrs to fix

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

                        public function fetch_report_data()
                        {
                            $settings = $this->config->get('PLUGIN_SETTINGS');
                            $dbc = FannieDB::get($settings['WarehouseDatabase']);
                    
                    
                    Severity: Major
                    Found in fannie/modules/plugins2.0/CoreWarehouse/reports/CWBasketReport.php - About 3 hrs to fix

                      Method forceStopBatch has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function forceStopBatch($id)
                          {
                              // verify limit columns exist
                              $b_def = $this->connection->tableDefinition($this->name);
                              $p_def = $this->connection->tableDefinition('products');
                      Severity: Major
                      Found in fannie/classlib2.0/data/models/op/BatchesModel.php - About 3 hrs to fix

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

                            public function get_view()
                            {
                                $dbc = $this->connection;
                                $dbc->selectDB($this->config->get('OP_DB'));
                                // for now, only denfeld is being shown
                        Severity: Major
                        Found in fannie/item/FloorSections/SubLocationViewer.php - About 3 hrs to fix

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

                              protected function get_view()
                              {
                                  $vendors = new VendorsModel($this->connection);
                                  $supers = new SuperDeptNamesModel($this->connection);
                                  $stores = FormLib::storePicker('store', false);
                          Severity: Major
                          Found in fannie/item/inventory/InvCountPage.php - About 3 hrs to fix

                            Method BuildMethodCall has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    private Expression BuildMethodCall(MethodBase method, Type type, ParameterExpression targetParameterExpression, ParameterExpression argsParameterExpression)
                                    {
                                        ParameterInfo[] parametersInfo = method.GetParameters();
                            
                                        Expression[] argsExpression = new Expression[parametersInfo.Length];

                              Method ProcessEMV has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected string ProcessEMV(string xml, bool autoReset)
                                  {
                                      /* 
                                         Substitute values into the XML request
                                         This is so the driver can handle any change
                              Severity: Major
                              Found in pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_EMVX.cs - About 3 hrs to fix

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

                                    mod.save = function() {
                                        $.ajax({
                                            type: 'post',
                                            data: 'json=' + encodeURIComponent(JSON.stringify(state))
                                        }).done(function() {
                                Severity: Major
                                Found in fannie/modules/plugins2.0/RP/rpFloral.js and 3 other locations - About 3 hrs to fix
                                fannie/modules/plugins2.0/RP/rpDirect.js on lines 75..83
                                fannie/modules/plugins2.0/RP/rpDual.js on lines 77..85
                                fannie/modules/plugins2.0/RP/rpOrder.js on lines 75..83

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

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

                                    mod.save = function() {
                                        $.ajax({
                                            type: 'post',
                                            data: 'json=' + encodeURIComponent(JSON.stringify(state))
                                        }).done(function() {
                                Severity: Major
                                Found in fannie/modules/plugins2.0/RP/rpDirect.js and 3 other locations - About 3 hrs to fix
                                fannie/modules/plugins2.0/RP/rpDual.js on lines 77..85
                                fannie/modules/plugins2.0/RP/rpFloral.js on lines 26..34
                                fannie/modules/plugins2.0/RP/rpOrder.js on lines 75..83

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

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

                                  function getElementTop() {
                                    var y = 0;
                                    var elm;
                                    if(typeof(p_elm) == "object"){
                                      elm = p_elm;
                                fannie/modules/plugins2.0/CoopCred/programs/CalendarControl.js on lines 6..19

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

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

                                    mod.save = function() {
                                        $.ajax({
                                            type: 'post',
                                            data: 'json=' + encodeURIComponent(JSON.stringify(state))
                                        }).done(function() {
                                Severity: Major
                                Found in fannie/modules/plugins2.0/RP/rpOrder.js and 3 other locations - About 3 hrs to fix
                                fannie/modules/plugins2.0/RP/rpDirect.js on lines 75..83
                                fannie/modules/plugins2.0/RP/rpDual.js on lines 77..85
                                fannie/modules/plugins2.0/RP/rpFloral.js on lines 26..34

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

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

                                    mod.save = function() {
                                        $.ajax({
                                            type: 'post',
                                            data: 'json=' + encodeURIComponent(JSON.stringify(state))
                                        }).done(function() {
                                Severity: Major
                                Found in fannie/modules/plugins2.0/RP/rpDual.js and 3 other locations - About 3 hrs to fix
                                fannie/modules/plugins2.0/RP/rpDirect.js on lines 75..83
                                fannie/modules/plugins2.0/RP/rpFloral.js on lines 26..34
                                fannie/modules/plugins2.0/RP/rpOrder.js on lines 75..83

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

                                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