Showing 3,246 of 4,217 total issues

Method save_locale_var has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function save_locale_var()
    {
        no_graphics(true);
        if ( ! DEBUG_MODE && ! $_SESSION['locale_vars_edit']) {
            return print 'Access denied';
Severity: Major
Found in plugins/dynamic/modules/dynamic/yf_dynamic_edit.class.php - About 2 hrs to fix

    Method _show_auto_table has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _show_auto_table($items = [], $params = [], $name = '')
        {
            if ( ! is_array($items)) {
                $items = [];
            }
    Severity: Major
    Found in classes/yf_debug.class.php - About 2 hrs to fix

      Method _api_PerfectMoney has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function _api_PerfectMoney($title)
          {
              $php = '';
              $api = _class('payment_api__provider_perfectmoney');
              $methods = [
      Severity: Major
      Found in plugins/payment/modules/yf_payment_test.class.php - About 2 hrs to fix

        Method _operation_table has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _operation_table($options = null)
            {
                // import options
                is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                // class
        Severity: Major
        Found in plugins/payment/admin_modules/yf_manage_payment.class.php - About 2 hrs to fix

          Method parse has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function parse($name, $replace = [], $params = [])
              {
                  $name = strtolower(trim($name));
                  // Support for the driver name in prefix, example: "twig:user/account", "smarty:user/account"
                  if (strpos($name, ':') !== false) {
          Severity: Major
          Found in plugins/tpl/classes/yf_tpl.class.php - About 2 hrs to fix

            Method _compile_foreach has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _compile_foreach($m)
                {
                    $start = '<' . '?p' . 'hp ';
                    $end = ' ?' . '>';
            
            
            Severity: Major
            Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf_compile.class.php - About 2 hrs to fix

              Method _process_replaces has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _process_replaces($string, array &$replace, $name = '')
                  {
                      if ( ! strlen($string) || false === strpos($string, '{')) {
                          return $string;
                      }
              Severity: Major
              Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf.class.php - About 2 hrs to fix

                Method _render_add_custom_fields has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _render_add_custom_fields(&$params, &$data, &$ids)
                    {
                        if ( ! $data || ! $ids || ! $params['custom_fields']) {
                            return false;
                        }
                Severity: Major
                Found in plugins/table2/classes/yf_table2.class.php - About 2 hrs to fix

                  Method supplier_edit has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function supplier_edit()
                      {
                          $_GET['id'] = (int) ($_GET['id']);
                          if (empty($_GET['id'])) {
                              return _e('Empty ID!');

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

                        public function show()
                        {
                            conf('_login_form_displayed', true);
                            if ( ! empty($_POST)) {
                                if (empty($_POST['login']) && empty($_POST['email'])) {
                    Severity: Major
                    Found in plugins/user/modules/yf_get_pswd.class.php - About 2 hrs to fix

                      Method clear_patterns has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function clear_patterns()
                          {
                              $html = table('SELECT * FROM ' . db('shop_patterns'), [
                                  'table_attr' => 'id="patterns_list"',
                                  'filter' => $_SESSION[$_GET['object'] . '__patterns'],

                        Method go has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function go()
                            {
                                if ( ! $this->allow()) {
                                    return false;
                                }
                        Severity: Major
                        Found in classes/yf_csrf_guard.class.php - About 2 hrs to fix

                          Method _get_grid has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _get_grid($data = [])
                              {
                                  $rows = [];
                                  foreach ((array) $data as $row_id => $row_items) {
                                      $cols = '';
                          Severity: Major
                          Found in plugins/dashboards/admin_modules/yf_manage_dashboards2.class.php - About 2 hrs to fix

                            Method test_where has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method create_models has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function create_models()
                                  {
                              try {
                                      $this->assertFalse(class_exists('bears'));
                                      $this->assertFalse(class_exists('fish'));
                              Severity: Major
                              Found in .dev/tests/functional/model/class_model_bears_test.Test.php - About 2 hrs to fix

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

                                    public function dd_table($replace = [], $field_types = [], $extra = [])
                                    {
                                        $extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
                                        if (DEBUG_MODE) {
                                            $ts = microtime(true);
                                Severity: Minor
                                Found in plugins/html/classes/yf_html.class.php - About 2 hrs to fix

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

                                      public function user_var_push($FORCE_ID = false)
                                      {
                                          $_GET['id'] = (int) ($FORCE_ID ? $FORCE_ID : $_GET['id']);
                                          $A = db()->query_fetch('SELECT * FROM ' . db('locale_user_tr') . ' WHERE id=' . (int) ($_GET['id']));
                                          if ( ! $A) {

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

                                        public function edit_item()
                                        {
                                            $item_info = db()->query_fetch('SELECT * FROM ' . db('menu_items') . ' WHERE id=' . (int) ($_GET['id']));
                                            if (empty($item_info['id'])) {
                                                return _e('No such menu item!');
                                    Severity: Minor
                                    Found in plugins/sys/admin_modules/yf_menus_editor.class.php - About 2 hrs to fix

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

                                          public function _do_login_with_encrypted()
                                          {
                                              header('X-Robots-Tag: noindex,nofollow,noarchive,nosnippet');
                                              if ( ! $_GET['id'] || strlen($_GET['id']) < 16 || is_numeric($_GET['id'])) {
                                                  $this->_encrypted_error = 'GET_id is not like an encrypted string';
                                      Severity: Minor
                                      Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 2 hrs to fix

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

                                            public function send(array $params = [], &$error_message = '')
                                            {
                                                require_php_lib('mandrill');
                                        
                                                try {
                                        Severity: Minor
                                        Found in plugins/email/classes/mail/yf_mail_driver_mandrill.class.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language