Showing 3,246 of 4,217 total issues

Method asset has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function asset($type = '')
    {
        session_write_close();
        no_graphics(true);
        $name = strtolower(preg_replace('~[^a-z0-9_-]+~ims', '', trim($_GET['id'])));
Severity: Minor
Found in plugins/dynamic/modules/dynamic/yf_dynamic_assets.class.php - About 1 hr to fix

    Method edit_item has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function edit_item()
        {
            $item_info = db()->query_fetch('SELECT * FROM ' . db('category_items') . ' WHERE id=' . (int) ($_GET['id']));
            if ( ! $item_info['id']) {
                return _e('No such item!');
    Severity: Minor
    Found in plugins/categories/admin_modules/yf_category_editor.class.php - About 1 hr to fix

      Method _after_init_hook has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function _after_init_hook()
          {
              $this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
              $this->events->fire('main.after_init_begin');
              $this->_check_site_maintenance();
      Severity: Minor
      Found in classes/yf_main.class.php - About 1 hr to fix

        Method get_paths has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function get_paths()
        {
            $paths = [
                'called_path' => rtrim(getcwd(), '/') . '/',
                'yf_path' => dirname(dirname(__DIR__)) . '/',
        Severity: Minor
        Found in .dev/console/yf.php - About 1 hr to fix

          Method test_from has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method set_cache has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function set_cache($out_type, $md5, $data = [])
                {
                    if ( ! $this->USE_CACHE) {
                        return false;
                    }
            Severity: Minor
            Found in plugins/assets/classes/yf_assets.class.php - About 1 hr to fix

              Method request_interkassa has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function request_interkassa()
                  {
                      // start
                      db()->begin();
                      // check operation
              Severity: Minor
              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                Method load__cbr_xml has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function load__cbr_xml($options = null)
                    {
                        // import options
                        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                        // var
                Severity: Minor
                Found in plugins/payment/classes/yf_payment_api__currency.class.php - About 1 hr to fix

                  Method load__p24_json has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function load__p24_json($options = null)
                      {
                          // import options
                          is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                          // var
                  Severity: Minor
                  Found in plugins/payment/classes/yf_payment_api__currency.class.php - About 1 hr to fix

                    Method status_interkassa has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function status_interkassa($options = null)
                        {
                            // import operation
                            is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                            // provider interkassa
                    Severity: Minor
                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                      Method account has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function account($options = null)
                          {
                              // by account_id
                              $result = $this->get_account__by_id($options);
                              if ( ! empty($result)) {
                      Severity: Minor
                      Found in plugins/payment/classes/yf_payment_api.class.php - About 1 hr to fix

                        Method load__cashex_json has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function load__cashex_json($options = null)
                            {
                                // import options
                                is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                // var
                        Severity: Minor
                        Found in plugins/payment/classes/yf_payment_api__currency.class.php - About 1 hr to fix

                          Method add_item has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function add_item()
                              {
                                  $menu_info = db()->get('SELECT * FROM ' . db('menus') . ' WHERE id=' . (int) ($_GET['id']));
                                  if (empty($menu_info['id'])) {
                                      return _e('No such menu!');
                          Severity: Minor
                          Found in plugins/sys/admin_modules/yf_menus_editor.class.php - About 1 hr to fix

                            Method _show has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function _show($return_array = false)
                                {
                                    if ($return_array) {
                                        $this->_nav_item_as_array = true;
                                    }
                            Severity: Minor
                            Found in plugins/site_nav_bar/modules/yf_site_nav_bar.class.php - About 1 hr to fix

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

                                  public function edit()
                                  {
                                      $a = $this->_get_info();
                                      if ( ! $a) {
                                          return _404();
                              Severity: Minor
                              Found in plugins/email/admin_modules/yf_manage_emails.class.php - About 1 hr to fix

                                Method _parse_column_type has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function _parse_column_type($str, &$error = false)
                                    {
                                        // TODO: use db ddl parser if available for the given db family (mysql currently supported)
                                        $str = trim($str);
                                        $type = $length = $decimals = $values = null;
                                Severity: Minor
                                Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 1 hr to fix

                                  Method _get_comments has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function _get_comments($NUM_NEWEST_COMMENTS, $user_id = '')
                                      {
                                          foreach ((array) module('comments')->COMMENT_LINKS as $key => $value) {
                                              $where .= 'object_name="' . $key . '"';
                                              if ($value !== end(module('comments')->COMMENT_LINKS)) {
                                  Severity: Minor
                                  Found in plugins/comments/modules/comments/yf_comments_integration.class.php - About 1 hr to fix

                                    Method send has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function send($phone, $text, $params = [])
                                        {
                                            if ( ! $this->_is_enabled()) {
                                                return false;
                                            }
                                    Severity: Minor
                                    Found in plugins/sms/classes/yf_service_turbosms.class.php - About 1 hr to fix

                                      Method _lst has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function _lst($id, $with_root = false)
                                          {
                                              $dir = $this->_path($id);
                                              $res = [];
                                              foreach (glob(rtrim($dir, '/') . '/*') as $f) {
                                      Severity: Minor
                                      Found in plugins/ckeditor/admin_modules/yf_ck_file_browser.class.php - About 1 hr to fix

                                        Method write_file has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function write_file($server_info = [], $local_file = '', $remote_file = '')
                                            {
                                                $local_file = trim($local_file);
                                                $remote_file = _class('ssh')->_prepare_path($remote_file);
                                                if ( ! _class('ssh')->_INIT_OK || ! $server_info || ! strlen($local_file) || ! strlen($remote_file)) {
                                        Severity: Minor
                                        Found in plugins/ssh/classes/ssh/yf_ssh_files.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language