Showing 3,246 of 4,217 total issues

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

    public function __construct($type = 'user', $no_db_connect = false, $auto_init_all = false, $_conf = [])
    {
        if ( ! isset($this->_time_start)) {
            $this->_time_start = microtime(true);
        }
Severity: Major
Found in classes/yf_main.class.php - About 2 hrs to fix

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

        public function _update_config($name = '', $no_indexing = false, $no_write = false)
        {
            $conf_file_path = $this->CONF_PATH . 'sphinx.conf';
            if (file_exists($conf_file_path) && ! is_readable($conf_file_path)) {
                return _e('Error!. File ' . $conf_file_path . ' is not readable! Please check permissions.');
    Severity: Major
    Found in plugins/search/admin_modules/yf_manage_sphinx.class.php - About 2 hrs to fix

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

          public function tip($in = null, $extra = [])
          {
              if ( ! is_array($extra)) {
                  $extra = [];
              }
      Severity: Major
      Found in classes/yf_graphics.class.php - About 2 hrs to fix

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

            public function test_with_data_full()
            {
                $data = [
                    [
                        'date' => strtotime('2014-08-12 12:03:19 UTC'),
        Severity: Major
        Found in .dev/tests/unit/functions/function_common_rss_page_test.php - About 2 hrs to fix

          Method _currency_rate_load has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function _currency_rate_load($options = null)
              {
                  // import options
                  is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                  // var
          Severity: Major
          Found in plugins/payment/modules/yf_payment_test.class.php - About 2 hrs to fix

            Method _init has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _init()
                {
                    if ( ! $this->ENABLE) {
                        return  null;
                    }
            Severity: Major
            Found in plugins/payment/classes/yf_payment_api__provider_ecommpay.class.php - About 2 hrs to fix

              Method _get_users_daily_payments has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _get_users_daily_payments($user_ids = [], $type = 'sum')
                  {
                      if ( ! $user_ids) {
                          return false;
                      }
              Severity: Major
              Found in plugins/payment/admin_modules/yf_manage_payment.class.php - About 2 hrs to fix

                Method _get_time_diff_human has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _get_time_diff_human($seconds, $delimiter = ' ', $need_return = false, $only_text = false, $need_closing_tag = false)
                    {
                        $d = [];
                        $tr = [
                            'years' => ['лет', 'год', 'года'],
                Severity: Major
                Found in plugins/common/classes/yf_common.class.php - About 2 hrs to fix

                  Method upload_dir has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function upload_dir($server_info = [], $local_dir = '', $remote_dir = '', $pattern_include = '', $pattern_exclude = '', $level = null)
                      {
                          $local_dir = _class('ssh')->_prepare_path($local_dir);
                          $remote_dir = _class('ssh')->_prepare_path($remote_dir);
                          if ( ! _class('ssh')->_INIT_OK || ! $server_info || ! strlen($local_dir) || ! strlen($remote_dir)) {
                  Severity: Major
                  Found in plugins/ssh/classes/ssh/yf_ssh_files.class.php - About 2 hrs to fix

                    Method test_get_and_limit has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function test_get_and_limit()
                        {
                            if ($this->_need_skip_test(__FUNCTION__)) {
                                return;
                            }
                    Severity: Major
                    Found in .dev/tests/functional/db/class_db_real_mysql_test.Test.php - About 2 hrs to fix

                      Method test_join has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        File test_globals_vs_class.php has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        function globals_var($name, $value = null)
                        {
                            if ( ! isset($name)) {
                        Severity: Minor
                        Found in .dev/samples/test_globals_vs_class.php - About 2 hrs to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      if ($in_string) {
                                          for (;;) {
                                              $i = strpos($sql, $string_start, $i);
                                              // No end of string found -> add the current substring to the
                                              // returned array
                          Severity: Critical
                          Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 2 hrs to fix

                            yf_db_driver_pgsql has 22 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class yf_db_driver_pgsql extends yf_db_driver
                            {
                                /** @var @conf_skip */
                                public $db_connect_id = null;
                            
                            
                            Severity: Minor
                            Found in plugins/db/classes/db/yf_db_driver_pgsql.class.php - About 2 hrs to fix

                              yf_wrapper_redis has 22 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class yf_wrapper_redis
                              {
                                  public $name = 'REDIS';    // instance name
                                  public $driver = 'phpredis'; // predis|phpredis
                              
                              
                              Severity: Minor
                              Found in plugins/redis/classes/yf_wrapper_redis.class.php - About 2 hrs to fix

                                yf_manage_shop__product_revisions has 22 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class yf_manage_shop__product_revisions
                                {
                                    public $temp_fields = [
                                        'product' => ['image', 'add_date', 'update_date', 'last_viewed_date', 'viewed', 'sold', 'status', 'origin_url', 'source', 'featured'],
                                        'orders' => [],

                                  class_db_real_migrator_mysql_test has 22 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class class_db_real_migrator_mysql_test extends db_real_abstract
                                  {
                                      public static function db_name()
                                      {
                                          return self::$DB_NAME;
                                  Severity: Minor
                                  Found in .dev/tests/functional/db/class_db_real_migrator_mysql.Test__off__.php - About 2 hrs to fix

                                    Method date_box has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function date_box($selected = '', $years = '', $name_postfix = '', $add_str = '', $show_what = 'ymd', $show_text = 1, $translate = 1)
                                        {
                                            if (is_array($selected)) {
                                                $extra = (array) $extra + $name;
                                                $selected = $extra['selected'];
                                    Severity: Major
                                    Found in plugins/html/classes/html/yf_html_datetime.class.php - About 2 hrs to fix

                                      Method date_box2 has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function date_box2($name, $selected = '', $years = '', $add_str = '', $show_what = 'ymd', $show_text = 1, $translate = 1)
                                          {
                                              if (is_array($selected)) {
                                                  $extra = (array) $extra + $name;
                                                  $name = $extra['name'];
                                      Severity: Major
                                      Found in plugins/html/classes/html/yf_html_datetime.class.php - About 2 hrs to fix

                                        Method _form_options has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function _form_options($options)
                                            {
                                                if ( ! $this->ENABLE) {
                                                    return  null;
                                                }
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language