wikimedia/wikimedia-fundraising-SmashPig

View on GitHub

Showing 476 of 476 total issues

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

    public function testPreabitrationWonSOAPMessageReceivedAndAcknowledged() {
        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 428..447
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 467..486
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 506..525
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 545..564
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 584..603
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 761..780

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

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

    public function testOrderOpenedSOAPMessageReceivedAndAcknowledged() {
        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 428..447
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 467..486
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 506..525
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 584..603
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 623..642
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 761..780

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

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

    public function testRefundedReversedSOAPMessageReceivedAndAcknowledged() {
        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 428..447
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 467..486
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 506..525
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 545..564
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 584..603
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 623..642

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

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

    public function testNotificationOfFraudSOAPMessageReceivedAndAcknowledged() {
        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 428..447
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 506..525
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 545..564
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 584..603
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 623..642
PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 761..780

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

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 static $errorCodes = [
        '3001' => ErrorCode::ACCOUNT_MISCONFIGURATION, // Invalid Credentials.
        '3002' => ErrorCode::UNKNOWN, // Unregistered IP address.
        '3003' => ErrorCode::BAD_SIGNATURE, // Merchant has no authorization to use this API.
        '4000' => ErrorCode::TRANSACTION_NOT_FOUND, // Payment not found.
Severity: Major
Found in PaymentProviders/dlocal/ErrorMapper.php and 1 other location - About 5 hrs to fix
PaymentProviders/Ingenico/PaymentProvider.php on lines 340..366

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

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

        $errorMap = [
            '20000000' => ErrorCode::MISSING_REQUIRED_DATA,
            // TODO: handle 400120 which is ErrorCode::DUPLICATE_ORDER_ID when the TXN is INSERT_ORDERWITHPAYMENT
            '400490' => ErrorCode::DUPLICATE_ORDER_ID,
            '300620' => ErrorCode::DUPLICATE_ORDER_ID,
Severity: Major
Found in PaymentProviders/Ingenico/PaymentProvider.php and 1 other location - About 5 hrs to fix
PaymentProviders/dlocal/ErrorMapper.php on lines 38..63

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

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

<?php

namespace SmashPig\PaymentProviders\Ingenico\Tests;

use SmashPig\PaymentData\FinalStatus;

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

        public function searchRefunds( array $input, ?string $after ): array {
            $response = $this->api->searchRefunds( $input, $after );
            if ( isset( $response['errors'] ) ) {
                return $response['errors'];
            }
    Severity: Major
    Found in PaymentProviders/Braintree/SearchTransactionsProvider.php and 1 other location - About 5 hrs to fix
    PaymentProviders/Braintree/SearchTransactionsProvider.php on lines 56..69

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

    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 searchDisputes( array $input, ?string $after ): array {
            $response = $this->api->searchDisputes( $input, $after );
            if ( isset( $response['errors'] ) ) {
                return $response['errors'];
            }
    Severity: Major
    Found in PaymentProviders/Braintree/SearchTransactionsProvider.php and 1 other location - About 5 hrs to fix
    PaymentProviders/Braintree/SearchTransactionsProvider.php on lines 36..49

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

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

    <?php
    
    namespace SmashPig\PaymentProviders\Ingenico\Tests;
    
    use PHPUnit_Framework_MockObject_MockObject;
    Severity: Minor
    Found in PaymentProviders/Ingenico/Tests/phpunit/PaymentProviderTest.php - About 5 hrs to fix

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

          public function testSuccessfulRefund() {
              $refund = new Refund();
              $refund->merchantAccountCode = 'WikimediaTest';
              $refund->currency = 'USD';
              $refund->amount = 10.00;
      PaymentProviders/Adyen/Tests/phpunit/ChargebackInitiatedActionTest.php on lines 26..44

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

      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 testSuccessfulChargeback() {
              $chargeback = new Chargeback();
              $chargeback->merchantAccountCode = 'WikimediaTest';
              $chargeback->currency = 'USD';
              $chargeback->amount = 10.00;
      PaymentProviders/Adyen/Tests/phpunit/RefundInitiatedActionTest.php on lines 25..43

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

      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 createGooglePayPayment( $params ) {
              $restParams = [
                  'amount' => $this->getArrayAmount( $params ),
                  'reference' => $params['order_id'],
                  'merchantAccount' => $this->account,
      Severity: Major
      Found in PaymentProviders/Adyen/Api.php and 1 other location - About 4 hrs to fix
      PaymentProviders/Adyen/Api.php on lines 360..386

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

      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 createApplePayPayment( $params ) {
              $restParams = [
                  'amount' => $this->getArrayAmount( $params ),
                  'reference' => $params['order_id'],
                  'merchantAccount' => $this->account,
      Severity: Major
      Found in PaymentProviders/Adyen/Api.php and 1 other location - About 4 hrs to fix
      PaymentProviders/Adyen/Api.php on lines 332..358

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

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

          public function testRequestForInformationSOAPMessageReceivedAndAcknowledged() {
              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 93..110
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 183..201
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 220..238
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 307..325
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 393..410

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

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

          public function testCaptureFailedSOAPMessageReceivedAndAcknowledged() {
              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 93..110
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 183..201
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 220..238
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 393..410
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 848..866

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

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

          public function testSOAPAuthorisationRecurringMessageReceivedAndAcknowledged() {
              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 183..201
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 220..238
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 307..325
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 393..410
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 848..866

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

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

          public function testChargeBackReversedSOAPMessageReceivedAndAcknowledged() {
              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 93..110
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 183..201
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 220..238
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 307..325
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 848..866

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

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

          public function testCancelAutoRescueSoapMessageReceivedAndAcknowledged() {
              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 93..110
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 220..238
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 307..325
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 393..410
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 848..866

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

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

          public function testCancellationMessageReceivedAndAcknowledged() {
              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 93..110
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 183..201
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 307..325
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 393..410
      PaymentProviders/Adyen/Tests/phpunit/NotificationRequestTest.php on lines 848..866

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

      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