Showing 4,217 of 4,217 total issues

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

  6 => [
    'id' => '6',
    'id2' => '1',
    'user_name' => 'serega',
    'user_id' => '4',
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 4..41
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 42..97
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 98..141
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 142..179
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 180..213
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 4..35
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 36..87
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 35..60
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 61..89
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 90..124

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

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

  4 => [
    'id' => '4',
    'id2' => '1',
    'user_name' => 'odlman',
    'user_id' => '5',
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 4..41
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 42..97
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 98..141
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 180..213
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 4..35
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 36..87
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 4..34
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 35..60
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 61..89
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 90..124

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

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

  3 => [
    'id' => '3',
    'id2' => '1',
    'user_name' => 'kingargyle',
    'user_id' => '6',
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 4..41
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 42..97
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 142..179
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 180..213
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 4..35
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 36..87
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 4..34
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 35..60
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 61..89
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 90..124

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

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

  8 => [
    'id' => '8',
    'id2' => '1',
    'user_name' => 'serega',
    'user_id' => '4',
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 4..41
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 42..97
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 98..141
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 142..179
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 180..213
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 4..35
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 36..87
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 4..34
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 35..60
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 90..124

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

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

  7 => [
    'id' => '7',
    'id2' => '1',
    'user_name' => 'serega',
    'user_id' => '4',
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 4..41
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 42..97
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 98..141
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 142..179
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 180..213
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 4..35
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 36..87
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 4..34
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 61..89
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 90..124

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

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

  9 => [
    'id' => '9',
    'id2' => '1',
    'user_name' => 'kingargyle',
    'user_id' => '6',
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 4..41
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 42..97
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 98..141
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 142..179
.dev/install/installer_data/db_tables_en/blog_posts.data.php on lines 180..213
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 4..35
.dev/install/installer_data/db_tables_ru/blog_posts.data.php on lines 36..87
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 4..34
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 35..60
.dev/install/installer_data/db_tables_uk/blog_posts.data.php on lines 61..89

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

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 test_matches()
    {
        $this->assertFalse(_class('validate')->matches('', ['param' => 'my_field']));
        $_POST['my_field'] = '55';
        $this->assertFalse(_class('validate')->matches('', ['param' => 'my_field'], ['my_field' => '55']));
Severity: Major
Found in .dev/tests/unit/class_validate_test.Test.php and 1 other location - About 2 hrs to fix
.dev/tests/unit/class_validate_test.Test.php on lines 135..141

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

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 ($this->INLINE_ASSETS_USE_DATA_URI && $content_type === 'inline') {
                $content_type = 'url';
                $params['href'] = 'data:' . $params['type'] . ';base64,' . base64_encode($this->_strip_css_input($str));
            } elseif ($this->FILE_ASSETS_USE_DATA_URI && strlen($str) <= $this->FILE_ASSETS_DATA_URI_MAX_SIZE) {
                $content_type = 'url';
Severity: Major
Found in plugins/assets/classes/yf_assets.class.php and 1 other location - About 2 hrs to fix
plugins/assets/classes/yf_assets.class.php on lines 2133..2139

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

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 ($this->INLINE_ASSETS_USE_DATA_URI && $content_type === 'inline') {
                $content_type = 'url';
                $params['src'] = 'data:' . $params['type'] . ';base64,' . base64_encode($this->_strip_js_input($str));
            } elseif ($this->FILE_ASSETS_USE_DATA_URI && strlen($str) <= $this->FILE_ASSETS_DATA_URI_MAX_SIZE) {
                $content_type = 'url';
Severity: Major
Found in plugins/assets/classes/yf_assets.class.php and 1 other location - About 2 hrs to fix
plugins/assets/classes/yf_assets.class.php on lines 2164..2170

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

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 test_differs()
    {
        $this->assertTrue(_class('validate')->differs('', ['param' => 'my_field']));
        $_POST['my_field'] = '55';
        $this->assertTrue(_class('validate')->differs('', ['param' => 'my_field'], ['my_field' => '55']));
Severity: Major
Found in .dev/tests/unit/class_validate_test.Test.php and 1 other location - About 2 hrs to fix
.dev/tests/unit/class_validate_test.Test.php on lines 128..134

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

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 _payout_PerfectMoney has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function _payout_PerfectMoney($title)
    {
        $payment_api = _class('payment_api');
        $provider_class = $payment_api->provider_class([
            'provider_name' => 'perfectmoney',
Severity: Major
Found in plugins/payment/modules/yf_payment_test.class.php - About 2 hrs to fix

    Method api_request has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function api_request($options = null)
        {
            if ( ! $this->ENABLE) {
                return  null;
            }

      Method recreate has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function recreate()
          {
              // var
              $payment_api = &$this->payment_api;
              $url = &$this->url;
      Severity: Major
      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs to fix

        Method _payout_WebMoney has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function _payout_WebMoney($title)
            {
                $payment_api = _class('payment_api');
                $provider_class = $payment_api->provider_class([
                    'provider_name' => 'webmoney',
        Severity: Major
        Found in plugins/payment/modules/yf_payment_test.class.php - About 2 hrs to fix

          Method _payout_process has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _payout_process($options = null)
              {
                  if ( ! $this->ENABLE) {
                      return  null;
                  }

            Method _payout_Interkassa has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function _payout_Interkassa($title)
                {
                    $payment_api = _class('payment_api');
                    $provider_class = $payment_api->provider_class([
                        'provider_name' => 'interkassa',
            Severity: Major
            Found in plugins/payment/modules/yf_payment_test.class.php - About 2 hrs to fix

              Method js_cors has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function js_cors()
                  {
                      $api = _class('api');
                      echo <<<'EOS'
              <!DOCTYPE html>
              Severity: Major
              Found in plugins/payment/modules/yf_payment_test.class.php - About 2 hrs to fix

                Method provider has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method _pcntl_dispatch has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function _pcntl_dispatch($options = null)
                      {
                          $result = false;
                          // import options
                          is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                  Severity: Major
                  Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 2 hrs to fix

                    Method _recursive_get_menu_items has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _recursive_get_menu_items($menu_id = 0, $skip_item_id = 0)
                        {
                            if (empty($menu_id) || empty($this->_menu_items[$menu_id])) {
                                return false;
                            }
                    Severity: Major
                    Found in plugins/sys/classes/yf_core_menu.class.php - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language