wikimedia/wikimedia-fundraising-SmashPig

View on GitHub

Showing 471 of 471 total issues

File NotificationRequestTest.php has 863 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SmashPig\PaymentProviders\Adyen\Tests\phpunit;

use SmashPig\Core\Context;
Severity: Major
Found in PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php - About 2 days to fix

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

    <?php
    
    namespace SmashPig\PaymentProviders\Adyen\Maintenance;
    
    require __DIR__ . '/../../../Maintenance/MaintenanceBase.php';
    Severity: Major
    Found in PaymentProviders/Adyen/Maintenance/ApprovePayments.php and 1 other location - About 1 day to fix
    PaymentProviders/Adyen/Maintenance/RefundPayments.php on lines 1..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 394.

    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

    <?php
    
    namespace SmashPig\PaymentProviders\Adyen\Maintenance;
    
    require __DIR__ . '/../../../Maintenance/MaintenanceBase.php';
    Severity: Major
    Found in PaymentProviders/Adyen/Maintenance/RefundPayments.php and 1 other location - About 1 day to fix
    PaymentProviders/Adyen/Maintenance/ApprovePayments.php on lines 1..68

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

    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 testChargeBackSOAPMessageReceivedAndAcknowledged() {
            if ( !class_exists( \SoapServer::class ) ) {
                $this->markTestSkipped( 'Soap server disabled on CI' );
            }
            $request = $this->getMockBuilder( Request::class )->disableOriginalConstructor()
    PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 712..736

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

    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 testRefundSOAPMessageReceivedAndAcknowledged() {
            if ( !class_exists( \SoapServer::class ) ) {
                $this->markTestSkipped( 'Soap server disabled on CI' );
            }
            $request = $this->getMockBuilder( Request::class )->disableOriginalConstructor()
    PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 344..368

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

    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 ApiTest.php has 639 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace SmashPig\PaymentProviders\dlocal\Tests;
    
    use SmashPig\Core\ApiException;
    Severity: Major
    Found in PaymentProviders/dlocal/Tests/phpunit/ApiTest.php - About 1 day to fix

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

          public function testChargeBackJSONMessageReceivedAndAcknowledged() {
              $request = $this->getMockBuilder( Request::class )->disableOriginalConstructor()
              ->getMock();
              $response = $this->getMockBuilder( Response::class )->disableOriginalConstructor()
              ->getMock();
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 738..759

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

      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 testRefundJSONMessageReceivedAndAcknowledged() {
              $request = $this->getMockBuilder( Request::class )->disableOriginalConstructor()
              ->getMock();
              $response = $this->getMockBuilder( Response::class )->disableOriginalConstructor()
              ->getMock();
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 370..391

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

      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 testSuccessfulAutoRescueAuthorisationMessageCapture(): void {
              $authorisation = JsonSerializableObject::fromJsonProxy(
                  'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation',
                  file_get_contents( __DIR__ . '/../Data/successful_auto_rescue_auth.json' )
              );
      PaymentProviders/Adyen/Tests/phpunit/AutoRescueActionTest.php on lines 88..119

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

      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 testSuccessfulAutoRescueAuthorisationMessageCaptureJPY(): void {
              $authorisation = JsonSerializableObject::fromJsonProxy(
                  'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation',
                  file_get_contents( __DIR__ . '/../Data/successful_auto_rescue_auth_jpy.json' )
              );
      PaymentProviders/Adyen/Tests/phpunit/AutoRescueActionTest.php on lines 55..86

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

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

          public static function getNationalCurrencies() {
              $nationalCurrencies = [
                  'AD' => 'EUR',
                  'AE' => 'AED',
                  'AF' => 'AFN',
      Severity: Major
      Found in PaymentData/ReferenceData/NationalCurrencies.php - About 1 day to fix

        File CardPaymentProviderTest.php has 563 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace SmashPig\PaymentProviders\dlocal\Tests;
        
        use SmashPig\Core\ApiException;
        Severity: Major
        Found in PaymentProviders/dlocal/Tests/phpunit/CardPaymentProviderTest.php - About 1 day to fix

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

              private function getBaseParams(): array {
                  $input = [
                      'order_id' => '123.3',
                      'amount' => '100',
                      'currency' => 'MXN',
          PaymentProviders/dlocal/Tests/phpunit/DirectCardPaymentApiRequestMapperTest.php on lines 67..112
          PaymentProviders/dlocal/Tests/phpunit/RecurringChargePaymentApiRequestMapperTest.php on lines 41..86

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

          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

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

              private function getBaseParams(): array {
                  $input = [
                      'order_id' => '123.3',
                      'amount' => '100',
                      'currency' => 'MXN',
          PaymentProviders/dlocal/Tests/phpunit/DirectCardAuthorizePaymentApiRequestMapperTest.php on lines 89..134
          PaymentProviders/dlocal/Tests/phpunit/RecurringChargePaymentApiRequestMapperTest.php on lines 41..86

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

          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

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

              private function getBaseParams(): array {
                  $input = [
                      'order_id' => '123.3',
                      'amount' => '100',
                      'currency' => 'MXN',
          PaymentProviders/dlocal/Tests/phpunit/DirectCardAuthorizePaymentApiRequestMapperTest.php on lines 89..134
          PaymentProviders/dlocal/Tests/phpunit/DirectCardPaymentApiRequestMapperTest.php on lines 67..112

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

          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

              private function getBaseParams(): array {
                  $input = [
                      'order_id' => '123.3',
                      'amount' => '100',
                      'currency' => 'MXN',
          PaymentProviders/dlocal/Tests/phpunit/CardPaymentApiRequestMapperTest.php on lines 63..107

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

          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

              private function getBaseParams(): array {
                  $input = [
                      'order_id' => '123.3',
                      'amount' => '100',
                      'currency' => 'MXN',
          PaymentProviders/dlocal/Tests/phpunit/RedirectPaymentApiRequestMapperTest.php on lines 29..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 264.

          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

              public function testCollectUPIDirectSuccess(): void {
                  $params = $this->getINCreatePaymentRequestParams();
                  $params['upi_id'] = '11111111@axisb';
                  $mockResponse = $this->prepareMockResponse( 'collect-bank-direct-success.response', 200 );
                  $this->curlWrapper->expects( $this->once() )
          Severity: Major
          Found in PaymentProviders/dlocal/Tests/phpunit/ApiTest.php and 3 other locations - About 1 day to fix
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 372..395
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 400..423
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 458..481

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

          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

              public function testValidateUpiIdFailed():void {
                  $params = $this->getINCreatePaymentRequestParams();
                  $params['upi_id'] = 'asdf@axisb';
                  $mockResponse = $this->prepareMockResponse( 'validate-upi-id-failed.response', 200 );
                  $this->curlWrapper->expects( $this->once() )
          Severity: Major
          Found in PaymentProviders/dlocal/Tests/phpunit/ApiTest.php and 3 other locations - About 1 day to fix
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 372..395
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 429..452
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 458..481

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

          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

              public function testValidateUpiIdValid():void {
                  $params = $this->getINCreatePaymentRequestParams();
                  $params['upi_id'] = '11111111@axisb';
                  $mockResponse = $this->prepareMockResponse( 'validate-upi-id-success.response', 200 );
                  $this->curlWrapper->expects( $this->once() )
          Severity: Major
          Found in PaymentProviders/dlocal/Tests/phpunit/ApiTest.php and 3 other locations - About 1 day to fix
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 400..423
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 429..452
          PaymentProviders/dlocal/Tests/phpunit/ApiTest.php on lines 458..481

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

          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

          Severity
          Category
          Status
          Source
          Language