CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

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

    public function get_id_view()
    {
        global $FANNIE_URL;
        $ret = '';

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

    Method get_done_handler has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function get_done_handler()
        {
            $emp = $this->config->get('EMP_NO');
            $reg = $this->config->get('REGISTER_NO');
            $trans = DTrans::getTransNo($this->connection, $emp, $reg);
    Severity: Major
    Found in fannie/modules/plugins2.0/OrderTablet/OrderTabletPage.php - About 2 hrs to fix

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

          public function drawPDF()
          {
              $pdf = $this->createPDF();
              $dbc = FannieDB::get(FannieConfig::config('OP_DB'));
              $basicP = $dbc->prepare("SELECT
      Severity: Major
      Found in fannie/modules/plugins2.0/CoopDealsSigns/WfcSmartSigns12UpP.php - About 2 hrs to fix

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

            function form_content()
            {
                global $FANNIE_OP_DB;
                $dbc = FannieDB::get($FANNIE_OP_DB);
                // inner join so that only types
        Severity: Major
        Found in fannie/mem/NewMemberTool.php - About 2 hrs to fix

          Method getTagData has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getTagData($price=false)
              {
                  /**
                    If a custom data source has been specified, let
                    that handle the calculations
          Severity: Major
          Found in fannie/classlib2.0/data/models/op/ProductsModel.php - About 2 hrs to fix

            Method postAccount has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private static function postAccount($dbc, $id, $json)
                {
                    $ret = array('errors' => 0, 'error-msg' => '');
                    $config = FannieConfig::factory();
                    $account = self::getModel($dbc, 'CustomerAccountsModel');
            Severity: Major
            Found in fannie/classlib2.0/member/MemberREST.php - About 2 hrs to fix

              Method getAddItemLine has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  static private function getAddItemLine($item_info, $labelInfo)
                  {
                      $line = 'CCOSPIA' . chr(253);
                      $line .= 'PNO' . $item_info['PLU'] . chr(253);
                      $line .= 'UPC' . ServiceScaleLib::pluToUPC($item_info['PLU']) . chr(253);
              Severity: Major
              Found in fannie/classlib2.0/item/EpScaleLib.php - About 2 hrs to fix

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

                    public function drawPDF()
                    {
                        $pdf = new \FPDF('P', 'mm', 'Letter');
                
                        $pdf->SetTopMargin($this->top);  //Set top margin of the page
                Severity: Major
                Found in fannie/classlib2.0/item/signage/TagsDoubleBarcode.php - About 2 hrs to fix

                  Method process_file has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function process_file($linedata, $indexes)
                      {
                          $dbc = $this->connection;
                          $dbc->selectDB($this->config->get('OP_DB'));
                  
                  
                  Severity: Major
                  Found in fannie/item/hobartcsv/CoolItemUploadPage.php - About 2 hrs to fix

                    Method process_file has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function process_file($linedata, $indexes)
                        {
                            global $FANNIE_OP_DB;
                            $dbc = FannieDB::get($FANNIE_OP_DB);
                    
                    
                    Severity: Major
                    Found in fannie/item/hobartcsv/HobartItemCsvUploadPage.php - About 2 hrs to fix

                      Method find has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function find($sort='', $reverse=false)
                          {
                              if (!is_array($sort)) {
                                  $sort = array($sort);
                              }
                      Severity: Major
                      Found in common/BasicModel.php - About 2 hrs to fix

                        Method SerializeDynamic has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                private void SerializeDynamic(JsonWriter writer, IDynamicMetaObjectProvider value, JsonDynamicContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
                                {
                                    OnSerializing(writer, contract, value);
                                    _serializeStack.Add(value);
                        
                        

                          Method Create has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public static ReflectionObject Create(Type t, MethodBase creator, params string[] memberNames)
                                  {
                                      ReflectionObject d = new ReflectionObject();
                          
                                      ReflectionDelegateFactory delegateFactory = JsonTypeReflector.ReflectionDelegateFactory;

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

                            function saveTillCounts() {
                                var ret = '';
                                $('.drop').each(function() {
                                    var rowID = this.id;
                                    var amt = Number(this.value);
                            Severity: Major
                            Found in fannie/modules/plugins2.0/OverShortTools/js/countV3.js and 3 other locations - About 2 hrs to fix
                            fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 52..61
                            fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 63..72
                            fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 66..75

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

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

                            function saveNotes() {
                                var ret = '';
                                $('.day-notes').each(function () {
                                    var noteID = this.id;
                                    var note = encodeURIComponent(this.value);
                            Severity: Major
                            Found in fannie/modules/plugins2.0/OverShortTools/js/countV3.js and 3 other locations - About 2 hrs to fix
                            fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 52..61
                            fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 63..72
                            fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 55..64

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

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

                            function saveTillCounts() {
                                var ret = '';
                                $('.drop').each(function() {
                                    var rowID = this.id;
                                    var amt = Number(this.value);
                            Severity: Major
                            Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 3 other locations - About 2 hrs to fix
                            fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 63..72
                            fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 55..64
                            fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 66..75

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

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

                            function saveNotes() {
                                var ret = '';
                                $('.day-notes').each(function () {
                                    var noteID = this.id;
                                    var note = encodeURIComponent(this.value);
                            Severity: Major
                            Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 3 other locations - About 2 hrs to fix
                            fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 52..61
                            fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 55..64
                            fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 66..75

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

                            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

                                    $.ajax({
                                        url: 'MarginToolFromSearch.php',
                                        type: 'post',
                                        data: 'upcs='+upcs+'&superID='+superID+'&newprices='+prices
                                    }).done(function(resp) {
                            Severity: Major
                            Found in fannie/item/marginTool.js and 1 other location - About 2 hrs to fix
                            fannie/item/marginTool.js on lines 76..82

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

                            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 qtyField(row)
                            {
                                var qty = $('<input type="text" name="cases[]" required />')
                                    .val(1)
                                    .addClass('input-sm')
                            Severity: Major
                            Found in fannie/purchasing/js/manual.js and 1 other location - About 2 hrs to fix
                            fannie/purchasing/js/manual.js on lines 56..64

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

                            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

                                    $.ajax({
                                        url: 'MarginToolFromSearch.php',
                                        type: 'post',
                                        data: 'upcs='+upcs+'&deptID='+deptID+'&newprices='+prices
                                    }).done(function(resp) {
                            Severity: Major
                            Found in fannie/item/marginTool.js and 1 other location - About 2 hrs to fix
                            fannie/item/marginTool.js on lines 95..101

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

                            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