Showing 4,217 of 4,217 total issues

Method _api_YandexMoney has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Method display_what has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function display_what()
        {
            $hooks_data = _class('admin_methods')->call_hooks('settings', $r);
            $avail_hook_modules = [];
            foreach ((array) $hooks_data as $k => $v) {
    Severity: Major
    Found in plugins/conf/admin_modules/yf_settings.class.php - About 2 hrs to fix

      Method fetch_data has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function fetch_data($params = [])
          {
              // Templates names
              $STPL_MAIN = ! empty($params['stpl_main']) ? $params['stpl_main'] : 'system/common/get_rss_page_main';
              $STPL_ITEM = ! empty($params['stpl_item']) ? $params['stpl_item'] : 'system/common/get_rss_page_item';
      Severity: Major
      Found in plugins/common/classes/common/yf_rss_data.class.php - About 2 hrs to fix

        Method data_get_latest_languages has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function data_get_latest_languages()
        {
            $url = 'https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes';
            $f2 = __DIR__ . '/' . basename($url) . '.table.html';
            if (!file_exists($f2)) {
        Severity: Major
        Found in .dev/scripts/languages/get_latest_languages.php - About 2 hrs to fix

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

              public function show()
              {
                  $docs = _class('docs');
                  $dir = $docs->demo_dir;
                  $dir_len = strlen($dir);
          Severity: Major
          Found in .dev/samples/classes/sample_demo.class.php - About 2 hrs to fix

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

                public function test_allow_deny_box()
                {
                    $this->assertEquals('<label class="radio radio-inline"><input type="radio" name="active" id="radio_box_1_1" value="DENY"><span><span class="btn btn-default btn-mini btn-xs btn-warning">'
                        . '<i class="icon-ban-circle fa fa-ban"></i> Deny</span></span></label><label class="radio radio-inline"><input type="radio" name="active" id="radio_box_1_2" value="ALLOW">'
                        . '<span><span class="btn btn-default btn-mini btn-xs btn-success"><i class="icon-ok fa fa-check"></i> Allow</span></span></label>', str_replace(PHP_EOL, '', trim(self::form_no_chain($r)->allow_deny_box('', ['force_id' => 'radio_box_1']))));
            Severity: Major
            Found in .dev/tests/unit/class_form_test.Test.php and 2 other locations - About 2 hrs to fix
            .dev/tests/unit/class_form_test.Test.php on lines 414..422
            .dev/tests/unit/class_form_test.Test.php on lines 432..440

            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 134.

            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 3 locations. Consider refactoring.
            Open

                public function test_active_box()
                {
                    $this->assertEquals('<label class="radio radio-inline"><input type="radio" name="active" id="radio_box_1_1" value="0"><span><span class="btn btn-default btn-mini btn-xs btn-warning">'
                        . '<i class="icon-ban-circle fa fa-ban"></i> Disabled</span></span></label><label class="radio radio-inline"><input type="radio" name="active" id="radio_box_1_2" value="1">'
                        . '<span><span class="btn btn-default btn-mini btn-xs btn-success"><i class="icon-ok fa fa-check"></i> Active</span></span></label>', str_replace(PHP_EOL, '', trim(self::form_no_chain($r)->active_box('', ['force_id' => 'radio_box_1']))));
            Severity: Major
            Found in .dev/tests/unit/class_form_test.Test.php and 2 other locations - About 2 hrs to fix
            .dev/tests/unit/class_form_test.Test.php on lines 423..431
            .dev/tests/unit/class_form_test.Test.php on lines 432..440

            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 134.

            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 3 locations. Consider refactoring.
            Open

                public function test_yes_no_box()
                {
                    $this->assertEquals('<label class="radio radio-inline"><input type="radio" name="active" id="radio_box_1_1" value="0"><span><span class="btn btn-default btn-mini btn-xs btn-warning">'
                        . '<i class="icon-ban-circle fa fa-ban"></i> No</span></span></label><label class="radio radio-inline"><input type="radio" name="active" id="radio_box_1_2" value="1">'
                        . '<span><span class="btn btn-default btn-mini btn-xs btn-success"><i class="icon-ok fa fa-check"></i> Yes</span></span></label>', str_replace(PHP_EOL, '', trim(self::form_no_chain($r)->yes_no_box('', ['force_id' => 'radio_box_1']))));
            Severity: Major
            Found in .dev/tests/unit/class_form_test.Test.php and 2 other locations - About 2 hrs to fix
            .dev/tests/unit/class_form_test.Test.php on lines 414..422
            .dev/tests/unit/class_form_test.Test.php on lines 423..431

            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 134.

            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 3 locations. Consider refactoring.
            Open

                'indexes' => [
                    'PRIMARY' => [
                        'name' => 'PRIMARY',
                        'type' => 'primary',
                        'columns' => [
            .dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 151..184
            .dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 226..259

            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 134.

            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 3 locations. Consider refactoring.
            Open

                'indexes' => [
                    'PRIMARY' => [
                        'name' => 'PRIMARY',
                        'type' => 'primary',
                        'columns' => [
            .dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_film.php on lines 226..259
            .dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 119..152

            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 134.

            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

            foreach (glob(__DIR__ . '/installer*_datas.php') as $_file) {
                $data = [];
                require_once $_file;
                foreach ((array) $data as $k => $v) {
                    if (false !== strpos($_file, '_sys_')) {
            Severity: Major
            Found in .dev/scripts/db/split_db_installer_tmp.php and 1 other location - About 2 hrs to fix
            .dev/scripts/db/split_db_installer_tmp.php on lines 11..21

            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 134.

            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

            foreach (glob(__DIR__ . '/installer*_structs.php') as $_file) {
                $data = [];
                require_once $_file;
                foreach ((array) $data as $k => $v) {
                    if (false !== strpos($_file, '_sys_')) {
            Severity: Major
            Found in .dev/scripts/db/split_db_installer_tmp.php and 1 other location - About 2 hrs to fix
            .dev/scripts/db/split_db_installer_tmp.php on lines 29..39

            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 134.

            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 3 locations. Consider refactoring.
            Open

                'indexes' => [
                    'PRIMARY' => [
                        'name' => 'PRIMARY',
                        'type' => 'primary',
                        'columns' => [
            .dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_customer.php on lines 151..184
            .dev/tests/unit/db/fixtures/class_db_ddl_parser_mysql_test_tbl_payment.php on lines 119..152

            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 134.

            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

                        if (strlen($sel_data['region_code'])) {
                            $_cities[''] = '  --   Please select city   --  ';
                            $Q = db()->query(
                                'SELECT * 
                                FROM ' . db('geo_city_location') . " 
            Severity: Major
            Found in plugins/geo/modules/yf_geo_content.class.php and 1 other location - About 2 hrs to fix
            plugins/geo/modules/yf_geo_content.class.php on lines 59..73

            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 134.

            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

                        if (strlen($_POST['region'])) {
                            $_cities[''] = '  --   Please select city   --  ';
                            $Q = db()->query(
                                'SELECT * 
                                FROM ' . db('geo_city_location') . " 
            Severity: Major
            Found in plugins/geo/modules/yf_geo_content.class.php and 1 other location - About 2 hrs to fix
            plugins/geo/modules/yf_geo_content.class.php on lines 216..230

            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 134.

            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

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

                public function show()
                {
                    $object = &$this->object;
                    $action = &$this->action;
                    $filter_name = &$this->filter_name;
            Severity: Major
            Found in plugins/payment/admin_modules/yf_manage_currency.class.php - About 2 hrs to fix

              Method _filter_form_show has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _filter_form_show($filter, $replace)
                  {
                      $order_fields = [
                          'o.operation_id' => 'номер операций',
                          'o.amount' => 'сумма',
              Severity: Major
              Found in plugins/payment/admin_modules/yf_manage_deposit.class.php - About 2 hrs to fix

                Method _filter_form_show has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _filter_form_show($filter, $replace)
                    {
                        $order_fields = [
                            'o.operation_id' => 'номер операций',
                            'o.amount' => 'сумма',
                Severity: Major
                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs to fix

                  Method datetime_select has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function datetime_select($name = '', $desc = '', $extra = [], $replace = [], $form)
                      {
                          if (is_array($desc)) {
                              $extra += $desc;
                              $desc = '';
                  Severity: Major
                  Found in plugins/form2/classes/form2/yf_form2_datetime.class.php - About 2 hrs to fix

                    Method _parse has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _parse($host, $url, $query, $url_str, $class_rewrite)
                        {
                            $s = '';
                            if (false !== strpos($url[0], '%')) {
                                $url[0] = urldecode($url[0]);
                    Severity: Major
                    Found in plugins/rewrite/classes/rewrite/yf_rewrite_pattern_yf.class.php - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language