Showing 3,246 of 4,217 total issues

Method _api_balance has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function _api_balance($request, $options)
    {
        // security
        $_request = [];
        foreach (['operation_id', 'amount', 'currency_id', 'provider_id', 'page', 'method_id', 'account', 'name'] as $key) {
Severity: Minor
Found in plugins/payment/modules/yf_payment.class.php - About 1 hr to fix

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

        public function show()
        {
            $func = function ($row) {
                return ! ($row['name'] == 'center_area' && $row['type'] == 'admin');
            };
    Severity: Minor
    Found in plugins/sys/admin_modules/yf_blocks.class.php - About 1 hr to fix

      Method api_request_send has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function api_request_send($options = null)
          {
              if ( ! $this->ENABLE) {
                  return  null;
              }
      Severity: Minor
      Found in plugins/payment/classes/yf_payment_api__provider_webmoney.class.php - About 1 hr to fix

        Method new_query has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function new_query($params = [])
            {
                if ($params['where'] === null) {
                    unset($params['where']);
                }
        Severity: Minor
        Found in plugins/sys/classes/yf_model.class.php - About 1 hr to fix

          Method _compile has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _compile($name, $replace = [], $string = '')
              {
                  $_time_start = microtime(true);
          
                  // For later check for templates changes
          Severity: Minor
          Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf_compile.class.php - About 1 hr to fix

            Method textarea has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function textarea($name, $desc = '', $extra = [], $replace = [])
                {
                    if (is_array($desc)) {
                        $extra = (array) $extra + $desc;
                        $desc = '';
            Severity: Minor
            Found in plugins/form2/classes/yf_form2.class.php - About 1 hr to fix

              Method stars has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function stars($name = '', $desc = '', $extra = [], $replace = [], $form)
                  {
                      if (is_array($desc)) {
                          $extra += $desc;
                          $desc = '';
              Severity: Minor
              Found in plugins/form2/classes/form2/yf_form2_stars.class.php - About 1 hr to fix

                Method _input_assign_params_from_validate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _input_assign_params_from_validate($extra = [], $form)
                    {
                        $name = $extra['name'];
                        $is_html_array = (false !== strpos($name, '['));
                        if ($is_html_array) {
                Severity: Minor
                Found in plugins/form2/classes/form2/yf_form2_validate.class.php - About 1 hr to fix

                  Method view_unread has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function view_unread()
                      {
                          if (empty(main()->USER_ID)) {
                              return;
                          }
                  Severity: Minor
                  Found in plugins/comments/modules/yf_comments.class.php - About 1 hr to fix

                    Method dequeue has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function dequeue($extra = [])
                        {
                            queue()->listen($this->QUEUE_NAME, function ($data) use ($extra) {
                                $data = json_decode($data, true);
                                if ($data) {
                    Severity: Minor
                    Found in plugins/email/classes/yf_email.class.php - About 1 hr to fix

                      Method authorize has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function authorize()
                          {
                              $request_token_info = $this->_storage_get('request_token');
                              if ($request_token_info && $_GET['denied'] != $request_token_info['oauth_token']) {
                                  return $request_token_info;
                      Severity: Minor
                      Found in plugins/oauth/classes/oauth/yf_oauth_driver1.class.php - About 1 hr to fix

                        Method get_user_info has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function get_user_info()
                            {
                                $access_token = $this->_storage_get('access_token');
                                if ( ! $access_token) {
                                    $access_token = $this->get_access_token();
                        Severity: Minor
                        Found in plugins/oauth/classes/oauth/yf_oauth_driver_mailru.class.php - About 1 hr to fix

                          Method is_search_engine_url has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function is_search_engine_url($url = '')
                              {
                                  $url = trim($url);
                                  if ( ! strlen($url)) {
                                      return false;
                          Severity: Minor
                          Found in plugins/common/classes/common/yf_spider_detection.class.php - About 1 hr to fix

                            Method unit_add has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function unit_add()
                                {
                                    if (main()->is_post()) {
                                        if ( ! $_POST['title']) {
                                            _re('Unit title must be filled');

                              Method user_edit has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function user_edit()
                                  {
                                      if ($_GET['id']) {
                                          $A = db()->query_fetch('SELECT * FROM ' . db('user') . ' WHERE id=' . (int) ($_GET['id']));
                                          if (empty($A)) {

                                Method products has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function products()
                                    {
                                        $sql = $this->_sql();
                                
                                        return table($sql, [

                                  Method _add_receiver_user has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function _add_receiver_user($name, $user_id, $text = '', $url = '')
                                      {
                                          $notification_id = db()->get_one('SELECT `id` FROM `' . db('notifications') . "` WHERE `id`='" . _es($name) . "' 
                                                                          OR (`is_common_template`=1 AND `template_alias` = '" . _es($name) . "')");
                                          if ((int) $notification_id == 0) {
                                  Severity: Minor
                                  Found in plugins/notifications/modules/yf_notifications.class.php - About 1 hr to fix

                                    Method checkout_group_revision has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function checkout_group_revision()
                                        {
                                            $_GET['id'] = (int) ($_GET['id']);
                                            $db = db('shop_product_revisions');
                                            $ids = db()->get_one('SELECT data FROM ' . $db . ' WHERE item_id=' . $_GET['id'] . ' AND data IS NOT NULL ORDER BY id DESC');

                                      Method _order_step_delivery has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function _order_step_delivery($FORCE_DISPLAY_FORM = false)
                                          {
                                              // Validate previous form
                                              if (main()->is_post() && ! $FORCE_DISPLAY_FORM) {
                                                  module('shop')->_order_validate_delivery();
                                      Severity: Minor
                                      Found in plugins/shop/modules/shop/yf_shop__order_step_delivery.class.php - About 1 hr to fix

                                        Method _get_group_prices has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function _get_group_prices($product_ids = [])
                                            {
                                                if (is_numeric($product_ids)) {
                                                    $return_single = $product_ids;
                                                    $product_ids = [$product_ids];
                                        Severity: Minor
                                        Found in plugins/shop/modules/shop/yf_shop__get_group_prices.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language