AuthorizeNet/sdk-dotnet

View on GitHub

Showing 545 of 545 total issues

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

    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
Severity: Major
Found in Authorize.NET/Api/Contracts/V1/AnetApiSchema.generated.cs and 1 other location - About 1 hr to fix
Authorize.NET/Utility/AnetApiSchema.generated.cs on lines 2068..2086

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

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

    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
Severity: Major
Found in Authorize.NET/Utility/AnetApiSchema.generated.cs and 1 other location - About 1 hr to fix
Authorize.NET/Api/Contracts/V1/AnetApiSchema.generated.cs on lines 2518..2536

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

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

        private Boolean createProfile(out String customerProfileId, out String paymentProfileId)
        {

            ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = CustomMerchantAuthenticationType;
            ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = TestEnvironment;

    Method SampleCodeCreateCreditRequestForSettledTransaction has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            [Ignore("Requires user to specify settled transaction")]
            public void SampleCodeCreateCreditRequestForSettledTransaction()
            {
                var rnd = new AnetRandom(DateTime.Now.Millisecond);

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

              public static void customerProfileMaskedType(customerProfileMaskedType argument)
              {
                  if (null != argument)
                  {
                      customerProfileExType(argument);
      Authorize.NET/Api/Contracts/V1/RequestFactoryWithSpecified.cs on lines 844..853

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

      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 void customerProfileType(customerProfileType argument)
              {
                  if (null != argument)
                  {
                      customerProfileBaseType(argument);
      Authorize.NET/Api/Contracts/V1/RequestFactoryWithSpecified.cs on lines 826..835

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

      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

          [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
          [System.SerializableAttribute()]
          [System.Diagnostics.DebuggerStepThroughAttribute()]
          [System.ComponentModel.DesignerCategoryAttribute("code")]
          [System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
      Severity: Major
      Found in Authorize.NET/Utility/AnetApiSchema.generated.cs and 1 other location - About 1 hr to fix
      Authorize.NET/Utility/AnetApiSchema.generated.cs on lines 406..424

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

      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

      namespace AuthorizeNet.Api.Controllers
      {
          using System;
          using AuthorizeNet.Api.Contracts.V1;
          using AuthorizeNet.Api.Controllers.Bases;
      Authorize.NET/Api/Controllers/ARBCreateSubscriptionController.cs on lines 1..30

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

      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

          [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
          [System.SerializableAttribute()]
          [System.Diagnostics.DebuggerStepThroughAttribute()]
          [System.ComponentModel.DesignerCategoryAttribute("code")]
          [System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
      Severity: Major
      Found in Authorize.NET/Utility/AnetApiSchema.generated.cs and 1 other location - About 1 hr to fix
      Authorize.NET/Utility/AnetApiSchema.generated.cs on lines 2110..2128

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

      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

      namespace AuthorizeNet.Api.Controllers
      {
          using System;
          using AuthorizeNet.Api.Contracts.V1;
          using AuthorizeNet.Api.Controllers.Bases;
      Authorize.NET/Api/Controllers/createFingerPrintController.cs on lines 1..30

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

      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

          [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
          [System.SerializableAttribute()]
          [System.Diagnostics.DebuggerStepThroughAttribute()]
          [System.ComponentModel.DesignerCategoryAttribute("code")]
          [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
      Severity: Major
      Found in Authorize.NET/Utility/AnetApiSchema.generated.cs and 1 other location - About 1 hr to fix
      Authorize.NET/Utility/AnetApiSchema.generated.cs on lines 949..964

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

      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

          [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
          [System.SerializableAttribute()]
          [System.Diagnostics.DebuggerStepThroughAttribute()]
          [System.ComponentModel.DesignerCategoryAttribute("code")]
          [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
      Severity: Major
      Found in Authorize.NET/Utility/AnetApiSchema.generated.cs and 1 other location - About 1 hr to fix
      Authorize.NET/Utility/AnetApiSchema.generated.cs on lines 850..865

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

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

              [Test]
              [Ignore("Requires user to specify settled transaction")]
              public void CreateCreditRequestForSettledECheckTransaction()
              {
                  var rnd = new AnetRandom(DateTime.Now.Millisecond);

        Method DecryptPaymentDataRequestTest has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                [Test]
                public void DecryptPaymentDataRequestTest()
                {
                    LogHelper.info(Logger, "decryptPaymentDataRequestTest");
        
        
        Severity: Minor
        Found in AuthorizeNETtest/Api/Controllers/Test/CreateTransactionTest.cs - About 1 hr to fix

          Method TransactionRequest_HandleError has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [Test]
                  public void TransactionRequest_HandleError()
                  {
                      LogHelper.info(Logger, "CreateProfileWithCreateTransactionRequestTest");
          
          

            Method TestSubscription_serialization_error has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Test]
                    public void TestSubscription_serialization_error()
                    {
                        var rnd = new AnetRandom(DateTime.Now.Millisecond);
                        ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = CustomMerchantAuthenticationType;
            Severity: Minor
            Found in AuthorizeNETtest/Api/Controllers/Test/ArbSubscriptionTest.cs - About 1 hr to fix

              Method MockcreateCustomerProfileTransactionTest has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Test]
                      public void MockcreateCustomerProfileTransactionTest()
                      {
                          //define all mocked objects as final
                          var mockController = GetMockController<createCustomerProfileTransactionRequest, createCustomerProfileTransactionResponse>();

                Method MockgetSettledBatchListTest has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        [Test]
                        public void MockgetSettledBatchListTest()
                        {
                            //define all mocked objects as final
                            var mockController = GetMockController<getSettledBatchListRequest, getSettledBatchListResponse>();

                  Method transactionRequestType has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public static void transactionRequestType(transactionRequestType argument)
                          {
                              if (null != argument)
                              {
                                  if (0 <= argument.amount) { argument.amountSpecified = true; }
                  Severity: Minor
                  Found in Authorize.NET/Api/Contracts/V1/RequestFactoryWithSpecified.cs - About 1 hr to fix

                    Method MockgetUnsettledTransactionListTest has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            [Test]
                            public void MockgetUnsettledTransactionListTest()
                            {
                                //define all mocked objects as final
                                var mockController = GetMockController<getUnsettledTransactionListRequest, getUnsettledTransactionListResponse>();
                      Severity
                      Category
                      Status
                      Source
                      Language