Showing 3,246 of 4,217 total issues

Method _check has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function _check($input = [], $user_info = [])
    {
        // Default banned status
        $BANNED_STATUS = false;
        // Nothing to check
Severity: Minor
Found in plugins/common/classes/common/yf_user_ban.class.php - About 2 hrs to fix

    Method show_orders has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function show_orders()
        {
            if ($this->SUPPLIER_ID) {
                $sql = 'SELECT o.*, COUNT(*) AS num_items
                        FROM ' . db('shop_orders') . ' AS o

      Method orders has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function orders()
          {
              if ( ! main()->USER_ID) {
                  if (main()->is_post()) {
                      module('shop')->order_validate_data();
      Severity: Minor
      Found in plugins/shop/modules/shop/yf_shop_orders.class.php - About 2 hrs to fix

        Method drag_items has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function drag_items()
            {
                $cat_info = db()->get('SELECT * FROM ' . db('categories') . ' WHERE name="' . db()->es($_GET['id']) . '" OR id=' . (int) ($_GET['id']));
                if ( ! $cat_info) {
                    return _e('No such category');
        Severity: Minor
        Found in plugins/categories/admin_modules/yf_category_editor.class.php - About 2 hrs to fix

          Method show_image has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function show_image($no_header = false, $no_exit = false)
              {
                  if (function_exists('main')) {
                      main()->NO_GRAPHICS = true;
                  }
          Severity: Minor
          Found in plugins/content/classes/yf_captcha.class.php - About 2 hrs to fix

            Method show has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function show()
                {
                    $id = preg_replace('~[^a-z0-9_-]+~ims', '', $_GET['id']);
                    $method = preg_replace('~[^a-z0-9_-]+~ims', '', $_GET['page']);
                    if (strlen($id)) {
            Severity: Minor
            Found in .dev/samples/classes/sample_form.class.php - About 2 hrs to fix

              Method test_update has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function test_update()
                  {
                      if ($this->_need_skip_test(__FUNCTION__)) {
                          return;
                      }

                Method test_many_to_many has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function test_many_to_many()
                    {
                        if ($this->_need_skip_test(__FUNCTION__)) {
                            return;
                        }
                Severity: Minor
                Found in .dev/tests/functional/model/class_model_bears_test.Test.php - About 2 hrs to fix

                  Method test_php_to_sql_db_installer has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function test_php_to_sql_db_installer()
                      {
                          if ($this->_need_skip_test(__FUNCTION__)) {
                              return;
                          }
                  Severity: Minor
                  Found in .dev/tests/unit/db/class_db_ddl_parser_mysql_test.Test.php - About 2 hrs to fix

                    Method test_recusrion3 has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function test_recusrion3()
                        {
                            $jquery_url = _class('assets')->get_asset('jquery', 'js');
                            $url = $jquery_url;
                            $url1 = $url . '?v=1';
                    Severity: Minor
                    Found in .dev/tests/unit/class_assets_test.Test.php - About 2 hrs to fix

                      Method edit has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function edit()
                          {
                              $object = &$this->object;
                              $action = &$this->action;
                              $filter_name = &$this->filter_name;
                      Severity: Minor
                      Found in plugins/payment/admin_modules/yf_manage_currency.class.php - About 1 hr to fix

                        Method _get_daily_stats has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _get_daily_stats($type = 'sum', $days = null)
                            {
                                $time = time();
                                $days = $days ?: 60;
                                $min_time = $time - $days * 86400;
                        Severity: Minor
                        Found in plugins/payment/admin_modules/yf_manage_payment.class.php - About 1 hr to fix

                          Method _create_invoice has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _create_invoice($options)
                              {
                                  $operation_id = $options['operation_id'];
                                  require_php_lib('bitpay');
                                  $storageEngine = new \Bitpay\Storage\FilesystemStorage();
                          Severity: Minor
                          Found in plugins/payment/classes/yf_payment_api__provider_bitpay.class.php - About 1 hr to fix

                            Method _product_image_upload has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function _product_image_upload($product_id)
                                {
                                    $products_images_dir = module('manage_shop')->products_img_dir;
                            
                                    $d = sprintf('%09s', $product_id);

                              Method express_pdf has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function express_pdf($send_mail = false)
                                  {
                                      $date = date('Y-m-d');
                                      $hours = (int) ($_GET['hours']);
                                      $orders = db()->get_2d('SELECT id FROM ' . db('shop_orders') . " WHERE delivery_time LIKE '" . $date . ' ' . $hours . "%' AND status = 1");

                                Method _data has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function _data()
                                    {
                                        $_sub_action = [
                                            '0' => '- не выбрано -',
                                            'load' => 'загрузить',

                                  Method mkdir_m has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function mkdir_m($dir_name, $dir_mode = 0755, $create_index_htmls = 0, $start_folder = '')
                                      {
                                          if ( ! $dir_name || ! strlen($dir_name)) {
                                              return 0;
                                          }
                                  Severity: Minor
                                  Found in classes/yf_dir.class.php - About 1 hr to fix

                                    Method execute has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function execute(InputInterface $input, OutputInterface $output)
                                        {
                                            global $yf_paths;
                                            require_once $yf_paths['db_setup_path'];
                                            init_yf();
                                    Severity: Minor
                                    Found in .dev/console/commands/yf_console_db_utils.class.php - About 1 hr to fix

                                      Method media_objects has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function media_objects()
                                          {
                                              //        $img = module('dynamic')->placeholder_img(array('width' => 300, 'height' => 200));
                                              $img = url('/dynamic/placeholder/64x64');
                                              $body = 'Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.';
                                      Severity: Minor
                                      Found in .dev/samples/classes/sample_html.class.php - About 1 hr to fix

                                        Method test_basic has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function test_basic()
                                            {
                                                $table = table();
                                                $this->assertEquals('<div class="alert alert-info">No records</div>', trim($table));
                                        
                                        
                                        Severity: Minor
                                        Found in .dev/tests/unit/class_table_test.Test.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language