CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

Method WFC_New_MEAT_14UP has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function WFC_New_MEAT_14UP($data,$offset=0,$showPrice=0)
{
    $dbc = FannieDB::get(FannieConfig::config('OP_DB'));
    $pdf = new WFC_New_MEAT_14UP_PDF('L','mm','Letter');
    $pdf->AddPage();
Severity: Major
Found in fannie/admin/labels/pdf_layouts/WFC_New_MEAT_14UP.php - About 2 hrs to fix

    Method WFC_MEAT_SN_14UP has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function WFC_MEAT_SN_14UP($data,$offset=0,$showPrice=0)
    {
        $dbc = FannieDB::get(FannieConfig::config('OP_DB'));
        $pdf = new WFC_MEAT_SN_14UP_PDF('L','mm','Letter');
        $pdf->AddPage();
    Severity: Major
    Found in fannie/admin/labels/pdf_layouts/WFC_MEAT_SN_14UP.php - About 2 hrs to fix

      Method WFC_Bulk_Repack_14UP has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function WFC_Bulk_Repack_14UP($data,$offset=0,$showPrice=0)
      {
          $dbc = FannieDB::get(FannieConfig::config('OP_DB'));
          $pdf = new WFC_Bulk_Repack_14UP_PDF('L','mm','Letter');
          $pdf->AddPage();
      Severity: Major
      Found in fannie/admin/labels/pdf_layouts/WFC_Bulk_Repack_14UP.php - About 2 hrs to fix

        Method get_date1_date2_handler has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function get_date1_date2_handler()
            {
                $date1 = date('Y-m-d', strtotime(FormLib::get('date1')));
                $date2 = date('Y-m-d', strtotime(FormLib::get('date2')));
                $args = array(FormLib::get('store'), $date1, $date2);
        Severity: Major
        Found in fannie/modules/plugins2.0/RP/RpFloralPage.php - About 2 hrs to fix

          Method get_date1_date2_handler has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function get_date1_date2_handler()
              {
                  $date1 = date('Y-m-d', strtotime(FormLib::get('date1')));
                  $date2 = date('Y-m-d', strtotime(FormLib::get('date2')));
                  $args = array(FormLib::get('store'), $date1, $date2);
          Severity: Major
          Found in fannie/modules/plugins2.0/RP/RpDirectPage.php - About 2 hrs to fix

            Method post_segID_store_handler has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function post_segID_store_handler()
                {
                    $json = array('err' => false, 'msg' => '');
            
                    $days = FormLib::get('day', array());
            Severity: Major
            Found in fannie/modules/plugins2.0/RP/RpSegmentation.php - About 2 hrs to fix

              Method preprocess has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function preprocess(){
                      global $FANNIE_URL,$FANNIE_PLUGIN_LIST,$FANNIE_PLUGIN_SETTINGS;
              
                      if (!isset($FANNIE_PLUGIN_LIST) || !in_array('CoopCred', $FANNIE_PLUGIN_LIST)) {
                          $this->errors[] = "The Coop Cred plugin is not enabled.";

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

                    public function run()
                    {
                        if (!class_exists('Automattic\WooCommerce\Client')) {
                            $this->cronMsg('Library missing. Use composer to install automattic/woocommerce');
                            return false;
                Severity: Major
                Found in fannie/modules/plugins2.0/WooSync/WooProductsTask.php - About 2 hrs to fix

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

                      public function run()
                      {
                          $settings = $this->config->get('PLUGIN_SETTINGS');
                          $url = $settings['CpwPriceURL'];
                          $mode = $settings['CpwCostUpdates'];
                  Severity: Major
                  Found in fannie/modules/plugins2.0/CpwPriceImport/CpwPriceTask.php - About 2 hrs to fix

                    Method body_content has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function body_content()
                        {
                            $ret = '';
                            $list = FormLib::get('l');
                    
                    
                    Severity: Major
                    Found in fannie/mem/MemberEditor.php - About 2 hrs to fix

                      Method post_handler has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function post_handler()
                          {
                              $this->data = array();
                              $this->invoice = array();
                              $invoice = FormLib::get('invoice');
                      Severity: Major
                      Found in fannie/item/likecodes/cool/RdwImport.php - About 2 hrs to fix

                        Method showEditForm has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function showEditForm($upc, $display_mode=1, $expand_mode=1)
                            {
                                $upc = BarcodeLib::padUPC($upc);
                                $dbc = $this->db();
                                $listP = $dbc->prepare('SELECT i.vendorID, v.vendorName, i.sku, i.units, i.description, i.cost
                        Severity: Major
                        Found in fannie/item/modules/CatalogModule.php - About 2 hrs to fix

                          Method ApplySerializerSettings has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private static void ApplySerializerSettings(JsonSerializer serializer, JsonSerializerSettings settings)
                                  {
                                      if (!CollectionUtils.IsNullOrEmpty(settings.Converters))
                                      {
                                          // insert settings converters at the beginning so they take precedence

                            Method ParseConstructor has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    private void ParseConstructor()
                                    {
                                        if (MatchValueWithTrailingSeparator("new"))
                                        {
                                            EatWhitespace(false);

                              Function ajax has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function ajax()
                                  {
                                      if ($this->session->get('CashierNo') === '') { // session is missing/invalid
                                          return array(
                                              'main_frame' => MiscLib::baseURL() . 'login.php',
                              Severity: Minor
                              Found in pos/is4c-nf/ajax/AjaxParser.php - About 2 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function magtekBlock has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function magtekBlock($str, $ret)
                                  {
                                      $parts = explode("|",$str);
                                      $tr1 = False;
                                      $tr2 = False;
                              Severity: Minor
                              Found in pos/is4c-nf/plugins/Paycards/card/EncBlock.php - About 2 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function handleResponseAuth has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function handleResponseAuth($authResult)
                                  {
                                      $resp = $this->desoapify("CreditTransactionResult",
                                          $authResult["response"]);
                                      $xml = new XmlData($resp);
                              Severity: Minor
                              Found in pos/is4c-nf/plugins/Paycards/MercuryE2E.php - About 2 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function preprocess has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function preprocess()
                                  {
                                      $this->conf = new PaycardConf();
                                      $choice = FormLib::get('selectlist', false);
                                      if ($choice !== false) {
                              Severity: Minor
                              Found in pos/is4c-nf/plugins/Paycards/gui/PaycardEmvMenu.php - About 2 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function preprocess has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function preprocess()
                                  {
                                      $this->conf = new PaycardConf();
                                      $this->bmpPath = $this->page_url . 'scale-drivers/drivers/NewMagellan/ss-output/tmp/';
                                      $this->capture = new SigCapture($this->conf);
                              Severity: Minor
                              Found in pos/is4c-nf/plugins/Paycards/gui/paycardSuccess.php - About 2 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function preprocess has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  function preprocess()
                                  {
                                      $this->boxColor = "coloredArea";
                                      $this->msg = _("Undo transaction");
                              
                              
                              Severity: Minor
                              Found in pos/is4c-nf/gui-modules/undo.php - About 2 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Severity
                              Category
                              Status
                              Source
                              Language