Showing 3,246 of 4,217 total issues

Method search has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function search($start_dirs, $pattern_include = '', $pattern_exclude = '', $pattern_find)
    {
        if ( ! is_array($start_dirs)) {
            $start_dirs = [$start_dirs];
        }
Severity: Minor
Found in classes/yf_dir.class.php - About 1 hr to fix

    Method include_module has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function include_module($path_to_module = '', $is_required = false)
        {
            if (DEBUG_MODE) {
                $_time_start = microtime(true);
            }
    Severity: Minor
    Found in classes/yf_main.class.php - About 1 hr to fix

      Method oauth has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function oauth($params = [])
          {
              if ( ! isset($params['only_icons'])) {
                  $params['only_icons'] = 1;
              }
      Severity: Minor
      Found in plugins/user/modules/yf_login_form.class.php - About 1 hr to fix

        Method delete_dir has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function delete_dir($start_dir, $delete_start_dir = false)
            {
                if ( ! $start_dir || ! file_exists($start_dir)) {
                    return false;
                }
        Severity: Minor
        Found in classes/yf_dir.class.php - About 1 hr to fix

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

              public function show()
              {
                  $validate_rules = [
                      '__form_id__' => 'register_form',
                      'login' => ['trim|required|min_length[2]|max_length[12]|ajax_is_unique[user.login]|xss_clean', function ($in) {
          Severity: Minor
          Found in plugins/user/modules/yf_register.class.php - About 1 hr to fix

            Method _send_main_headers has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _send_main_headers($content_length = 0)
                {
                    if (headers_sent($file, $line) || conf('no_headers')) {
                        //            trigger_error('Headers were sent in '.$file.':'.$line, E_USER_WARNING);
                        return false;
            Severity: Minor
            Found in classes/yf_graphics.class.php - About 1 hr to fix

              Method _get_lib_path has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _get_lib_path($name, $params = []) {
                      if (isset($this->php_libs[$name])) {
                          return $this->php_libs[$name];
                      }
                      if (!isset($this->_paths_cache)) {
              Severity: Minor
              Found in services/_yf_autoloader.php - About 1 hr to fix

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

                    protected function execute(InputInterface $input, OutputInterface $output)
                    {
                        init_yf();
                        if ( ! defined('PROJECT_PATH') || ! strlen(constant('PROJECT_PATH'))) {
                            $output->writeln('Error: not inside a project');
                Severity: Minor
                Found in .dev/console/commands/yf_console_langs_export.class.php - About 1 hr to fix

                  Method _hook_side_column has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _hook_side_column()
                      {
                          $skip_list = [
                              'get_methods',
                              'get_function_source',
                  Severity: Minor
                  Found in .dev/samples/classes/sample_core_api.class.php - About 1 hr to fix

                    Method _get_services has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _get_services()
                        {
                            $services = [];
                            $suffix = '.php';
                            $dir = 'share/services/';
                    Severity: Minor
                    Found in .dev/samples/classes/sample_services.class.php - About 1 hr to fix

                      Method test_replace has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function test_replace()
                          {
                              if ($this->_need_skip_test(__FUNCTION__)) {
                                  return;
                              }
                      Severity: Minor
                      Found in .dev/tests/functional/db/class_db_real_mysql_test.Test.php - About 1 hr to fix

                        Method _prepare_html has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _prepare_html($text = '', $need_strip_slashes = 1, $use_smart_function = 1)
                            {
                                if (is_array($text)) {
                                    foreach ((array) $text as $k => $v) {
                                        $text[$k] = $this->_prepare_html($v);
                        Severity: Minor
                        Found in classes/yf_utils.class.php - About 1 hr to fix

                          Method get_latest_timezones has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function get_latest_timezones()
                          {
                              $timezones_list = function () {
                                  $timezones = [];
                                  $offsets = [];
                          Severity: Minor
                          Found in .dev/scripts/timezones/get_latest_timezones.php - About 1 hr to fix

                            Method test_update_batch has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method test_complex_foreach has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function test_complex_foreach()
                                  {
                                      $data = [
                                          'test_array_1' => ['One', 'Two', 'Three', 'Four'],
                                          'test_array_2' => [
                              Severity: Minor
                              Found in .dev/tests/unit/tpl/tpl_driver_yf_core_test.Test.php - About 1 hr to fix

                                Method multi_check_box has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function multi_check_box($name, $values = [], $selected = [], $horizontal = true, $type = 2, $add_str = '', $translate = 0, $name_as_array = false)
                                Severity: Major
                                Found in plugins/html/classes/yf_html.class.php - About 1 hr to fix

                                  Method select_box has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public function select_box($name, $values = [], $selected = '', $show_text = false, $type = 2, $add_str = '', $translate = 0, $level = 0)
                                  Severity: Major
                                  Found in plugins/html/classes/yf_html.class.php - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if( is_payout ) {
                                                var min = $scope.payment.balance_limit_lower || 0;
                                                value -= +min;
                                                var _value = ( $scope.action.payout &&
                                                    $scope.action.payout.method &&
                                    Severity: Major
                                    Found in plugins/content/templates/user/js/ng/payment/balance-recharge.js - About 1 hr to fix

                                      Method set has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          public function set($name, $value = '', $expire = 0, $path = null, $domain = null, $secure = null, $httponly = null, $params = [])
                                      Severity: Major
                                      Found in plugins/sys/classes/yf_cookie.class.php - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                    if ($has_divider && $shard_year >= 1970 && $shard_year <= 2050 && $shard_month >= 1 && $shard_month <= 12 && $shard_day >= 1 && $shard_day <= 31) {
                                                        $shard_table_name = substr($name, 0, -strlen('_2013_07_01'));
                                                    }
                                        Severity: Major
                                        Found in plugins/db/classes/db/yf_db_installer.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language