Showing 4,217 of 4,217 total issues

File yf_sphinxsearch.class.php has 287 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * Sphinx search querying.
 */
Severity: Minor
Found in plugins/search/classes/yf_sphinxsearch.class.php - About 2 hrs to fix

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

        public function edit()
        {
            $a = $this->_get_info();
            if ( ! $a) {
                return _404();
    Severity: Major
    Found in plugins/static_pages/admin_modules/yf_static_pages.class.php - About 2 hrs to fix

      Method _tree_items has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function _tree_items(&$data, $extra = [])
          {
              if ($extra['show_controls'] && ! is_callable($extra['show_controls'])) {
                  $r = [
                      'edit_link' => isset($extra['edit_link']) ? $extra['edit_link'] : url('/@object/edit_item/%d/@page'),
      Severity: Major
      Found in plugins/html/classes/html/yf_html_tree.class.php - About 2 hrs to fix

        Method var_edit has 72 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function var_edit()
            {
                $a = $this->_get_var_info($_GET['id']);
                if ( ! $a) {
                    return _e('Wrong var id');
        Severity: Major
        Found in plugins/locale/admin_modules/yf_locale_editor.class.php - About 2 hrs to fix

          Method operation has 72 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function operation($options = null)
              {
                  $_ = &$options;
                  $is_no_count = &$_['no_count'];
                  $is_sql = &$_['sql'];
          Severity: Major
          Found in plugins/payment/classes/yf_payment_api.class.php - About 2 hrs to fix

            Method _get_methods has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _get_methods($params = [])
                {
                    $ONLY_PRIVATE_METHODS = [];
                    if (isset($params['private'])) {
                        $ONLY_PRIVATE_METHODS = $params['private'];
            Severity: Major
            Found in plugins/sys/classes/core_api/yf_core_api_user_modules.class.php - About 2 hrs to fix

              Method deposition has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method _db_change_if_ok has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _db_change_if_ok($table, $fields, $type, $extra = [])
                    {
                        $func = function ($table, $fields, $type, $extra, $form) {
                            if ( ! $table || ! $type || empty($_POST)) {
                                return $form;
                Severity: Major
                Found in plugins/form2/classes/yf_form2.class.php - About 2 hrs to fix

                  Method user has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function user($name = '', $extra = [])
                      {
                          if (is_array($name)) {
                              $extra = (array) $extra + $name;
                              $name = '';
                  Severity: Major
                  Found in plugins/table2/classes/yf_table2.class.php - About 2 hrs to fix

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    <?php
                    
                    use Symfony\Component\Console\Command\Command;
                    use Symfony\Component\Console\Input\InputArgument;
                    use Symfony\Component\Console\Input\InputInterface;
                    .dev/console/commands/yf_console_assets_cache_info.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_cache_purge.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_combine.class.php on lines 1..26

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 139.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    <?php
                    
                    use Symfony\Component\Console\Command\Command;
                    use Symfony\Component\Console\Input\InputArgument;
                    use Symfony\Component\Console\Input\InputInterface;
                    Severity: Major
                    Found in .dev/console/commands/yf_console_assets_combine.class.php and 3 other locations - About 2 hrs to fix
                    .dev/console/commands/yf_console_assets_cache_fill.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_cache_info.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_cache_purge.class.php on lines 1..26

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 139.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    <?php
                    
                    use Symfony\Component\Console\Command\Command;
                    use Symfony\Component\Console\Input\InputArgument;
                    use Symfony\Component\Console\Input\InputInterface;
                    .dev/console/commands/yf_console_assets_cache_fill.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_cache_info.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_combine.class.php on lines 1..26

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 139.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    <?php
                    
                    use Symfony\Component\Console\Command\Command;
                    use Symfony\Component\Console\Input\InputArgument;
                    use Symfony\Component\Console\Input\InputInterface;
                    .dev/console/commands/yf_console_assets_cache_fill.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_cache_purge.class.php on lines 1..26
                    .dev/console/commands/yf_console_assets_combine.class.php on lines 1..26

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 139.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                        public function _init()
                        {
                            $this->_auto_info['php_item'] = [
                                'id' => 'php_item',
                                'name' => 'CLONEABLE: php item name',
                    plugins/common/classes/common/yf_dashboards.class.php on lines 27..53

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 139.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                        public function _init()
                        {
                            $this->_auto_info['php_item'] = [
                                'id' => 'php_item',
                                'name' => 'CLONEABLE: php item name',
                    Severity: Major
                    Found in plugins/common/classes/common/yf_dashboards.class.php and 1 other location - About 2 hrs to fix
                    plugins/dashboards/admin_modules/yf_manage_dashboards.class.php on lines 26..52

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 139.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    File yf_docs.class.php has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    class yf_docs
                    {
                        private $whats_new = [
                    Severity: Minor
                    Found in plugins/docs/modules/yf_docs.class.php - About 2 hrs to fix

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

                          public function send(array $params = [], &$error_message = '')
                          {
                              require_php_lib('phpmailer');
                      
                              $mail = new PHPMailer(true); // defaults to using php 'mail()'
                      Severity: Major
                      Found in plugins/email/classes/mail/yf_mail_driver_phpmailer.class.php - About 2 hrs to fix

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

                            public function go($sql = '', $url_path = '', $render_type = '', $records_on_page = 0, $num_records = 0, $tpls_path = '', $add_get_vars = 1, $extra = [])
                            {
                                if (is_array($url_path)) {
                                    $extra = $url_path;
                                    $url_path = '';
                        Severity: Major
                        Found in plugins/common/classes/common/yf_divide_pages.class.php - About 2 hrs to fix

                          Method test_where_in has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function test_where_in()
                              {
                                  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

                            yf_auth_user has 25 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class yf_auth_user
                            {
                                /** @var bool Online users vars */
                                public $STORE_ONLINE_USERS = false;// Use db table to store online users or not
                                /** @var int Online TTL if inactive */
                            Severity: Minor
                            Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language