CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

File New_WFC_Deli_SquareTags.php has 302 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/New_WFC_Deli_SquareTags.php - About 3 hrs to fix

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

        private function handleResponseAuth($authResult)
        {
            $json = json_decode($authResult['response'], true);
    
            // initialize
    Severity: Major
    Found in pos/is4c-nf/plugins/Paycards/ValueLink.php - About 3 hrs to fix

      Method validateRequirement has 81 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function validateRequirement($req, $json)
          {
              // non-existant requirement is treated as valid
              if (!property_exists($req, 'value')) {
                  $req->valid = true;
      Severity: Major
      Found in pos/is4c-nf/lib/Scanning/SpecialUPCs/DatabarCoupon.php - About 3 hrs to fix

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

            public function run()
            {
                global $FANNIE_OP_DB, $FANNIE_TRANS_DB, $FANNIE_ARCHIVE_DB, $FANNIE_ARCHIVE_METHOD;
                $sql = FannieDB::get($FANNIE_TRANS_DB);
                $sql->throwOnFailure(true);
        Severity: Major
        Found in fannie/cron/tasks/TransArchiveTask.php - About 3 hrs to fix

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

              public function fetch_report_data()
              {
                  $mems = array();
          
                  $period = new PeriodsModel($this->connection);
          Severity: Major
          Found in fannie/reports/AR/AgeTrialBalanceReport.php - About 3 hrs to fix

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

                public function fetch_report_data()
                {
                    $dbc = $this->connection;
                    $dbc->selectDB($this->config->get('OP_DB'));
            
            

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

                  public function run()
                  {
                      global $argv, $FANNIE_OP_DB, $FANNIE_PLUGIN_SETTINGS;
                      $dbc = FannieDB::get($FANNIE_OP_DB);
                      $dateObj = new SpinsDate($FANNIE_PLUGIN_SETTINGS['SpinsOffset']);
              Severity: Major
              Found in fannie/modules/plugins2.0/SPINS/SpinsSubmitTask.php - About 3 hrs to fix

                Method css_content has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function css_content()
                    {
                        return '
                                table td,th {
                                    border-top: none !important;

                  Method getView has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getView()
                      {
                          $dbc = $this->connection;
                          $vendorInvoiceID = FormLib::get('vendorInvoiceID');
                          $date1 = FormLib::get('date1');
                  Severity: Major
                  Found in fannie/purchasing/SalesByInvoicePage.php - About 3 hrs to fix

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

                        public function drawPDF()
                        {
                            $pdf = new \FPDF('L', 'mm', 'Letter');
                            $pdf->SetMargins(6.35, 6.35, 6.35);
                            $pdf->SetAutoPageBreak(false);
                    Severity: Major
                    Found in fannie/classlib2.0/item/signage/Giganto1UpL.php - About 3 hrs to fix

                      Method editForm has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function editForm($upc,$isNew)
                          {
                              $FANNIE_PRODUCT_MODULES = $this->getConfiguredModules();
                              $FANNIE_URL = $this->config->get('URL');
                              $shown = array();
                      Severity: Major
                      Found in fannie/item/ItemEditorPage.php - About 3 hrs to fix

                        Method get_id_print_handler has 81 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/OrderTags.php - About 3 hrs to fix

                          Method ReadAsBytesInternal has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  internal byte[] ReadAsBytesInternal()
                                  {
                                      _readType = ReadType.ReadAsBytes;
                          
                                      JsonToken t;

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

                            while($row = $sql->fetch_row($result)) {
                                $order_ids[] = (int)$row['mixMatch'];
                                $trans_ids[] = (int)$row['matched'];
                            
                                // log to history if entry doesn't already exist
                            Severity: Major
                            Found in fannie/cron/nightly.specialorder.php and 1 other location - About 3 hrs to fix
                            fannie/cron/tasks/SpecialOrdersTask.php on lines 301..315

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

                            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

                                    while($row = $sql->fetch_row($result)) {
                                        $order_ids[] = (int)$row['mixMatch'];
                                        $trans_ids[] = (int)$row['matched'];
                            
                                        // log to history if entry doesn't already exist
                            Severity: Major
                            Found in fannie/cron/tasks/SpecialOrdersTask.php and 1 other location - About 3 hrs to fix
                            fannie/cron/nightly.specialorder.php on lines 188..202

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

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

                                private function previewTrans($trans)
                                {
                                    list($emp, $reg, $tID) = explode('::', $trans);
                                    $dbc = Database::tDataConnect();
                                    $previewP = $dbc->prepare("
                            Severity: Major
                            Found in pos/is4c-nf/gui-modules/TransList.php and 2 other locations - About 3 hrs to fix
                            pos/is4c-nf/gui-modules/giftReceiptList.php on lines 113..137
                            pos/is4c-nf/gui-modules/rplist.php on lines 147..171

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

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

                                private function previewTrans($trans)
                                {
                                    list($emp, $reg, $tID) = explode('::', $trans);
                                    $dbc = Database::tDataConnect();
                                    $previewP = $dbc->prepare("
                            Severity: Major
                            Found in pos/is4c-nf/gui-modules/rplist.php and 2 other locations - About 3 hrs to fix
                            pos/is4c-nf/gui-modules/TransList.php on lines 131..156
                            pos/is4c-nf/gui-modules/giftReceiptList.php on lines 113..137

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

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

                                private function previewTrans($trans)
                                {
                                    list($reg, $emp, $tID) = explode('::', $trans);
                                    $dbc = Database::tDataConnect();
                                    $previewP = $dbc->prepare("
                            Severity: Major
                            Found in pos/is4c-nf/gui-modules/giftReceiptList.php and 2 other locations - About 3 hrs to fix
                            pos/is4c-nf/gui-modules/TransList.php on lines 131..156
                            pos/is4c-nf/gui-modules/rplist.php on lines 147..171

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

                            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

                            Function scanRecorder has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var scanRecorder = (function ($) {
                            
                                var prefix = "SaScan_";
                                var mod = {};
                            
                            
                            Severity: Major
                            Found in fannie/modules/plugins2.0/ShelfAudit/js/scanRecorder.js - About 3 hrs to fix

                              Function msi has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var msi = (function ($) {
                              
                                  var mod = {};
                              
                                  function getItemRow(type, col) {
                              Severity: Major
                              Found in fannie/modules/plugins2.0/MenuScreens/js/msi.js - About 3 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language