AuthorizeNet/sdk-dotnet

View on GitHub

Showing 74 of 545 total issues

File AnetApiSchema.generated.cs has 3757 lines of code (exceeds 250 allowed). Consider refactoring.
Open

namespace AuthorizeNet.Api.Contracts.V1 {
    using System.Xml.Serialization;
    
    
    /// <remarks/>
Severity: Major
Found in Authorize.NET/Api/Contracts/V1/AnetApiSchema.generated.cs - About 1 wk to fix

    File AnetApiSchema.generated.cs has 3057 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    namespace AuthorizeNet.APICore {
        using System.Xml.Serialization;
        
        
        /// <remarks/>
    Severity: Major
    Found in Authorize.NET/Utility/AnetApiSchema.generated.cs - About 1 wk to fix

      File RequestFactoryWithSpecified.cs has 1609 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      namespace AuthorizeNet.Api.Contracts.V1
      {
          using System;
      #pragma warning disable 169
      #pragma warning disable 1591
      Severity: Major
      Found in Authorize.NET/Api/Contracts/V1/RequestFactoryWithSpecified.cs - About 4 days to fix

        Class RequestFactoryWithSpecified has 213 methods (exceeds 20 allowed). Consider refactoring.
        Open

            public static class RequestFactoryWithSpecified
            {
                public static void decryptPaymentDataRequest(decryptPaymentDataRequest argument)
                {
                    if (null != argument)
        Severity: Major
        Found in Authorize.NET/Api/Contracts/V1/RequestFactoryWithSpecified.cs - About 4 days to fix

          Method AllEnumTest has 261 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [Test]
                  public void AllEnumTest()
                  {
          
                      foreach (var anEnum in Enum.GetValues(typeof(messageTypeEnum)))
          Severity: Major
          Found in AuthorizeNETtest/Api/Controllers/Test/AllGeneratedEnumTest.cs - About 1 day to fix

            File ApiCoreTestBase.cs has 523 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            using AuthorizeNet.Utility;
            
            namespace AuthorizeNet.Api.Controllers.Test
            {
                using System;
            Severity: Major
            Found in AuthorizeNETtest/Api/Controllers/Test/ApiCoreTestBase.cs - About 1 day to fix

              Method SetUp has 150 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [SetUp]
                      public void SetUp()
                      {
                          MockContext = new MockFactory();
              
              
              Severity: Major
              Found in AuthorizeNETtest/Api/Controllers/Test/ApiCoreTestBase.cs - About 6 hrs to fix

                File CreateTransactionSampleTest.cs has 404 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using AuthorizeNet.Utility;
                
                namespace AuthorizeNet.Api.Controllers.SampleTest
                {
                    using System;

                  File ArbSubscriptionTest.cs has 373 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  using AuthorizeNet.Utility;
                  
                  namespace AuthorizeNet.Api.Controllers.Test
                  {
                      using System;
                  Severity: Minor
                  Found in AuthorizeNETtest/Api/Controllers/Test/ArbSubscriptionTest.cs - About 4 hrs to fix

                    Method PostData has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public static ANetApiResponse PostData<TQ, TS>(AuthorizeNet.Environment env, TQ request) 
                                where TQ : ANetApiRequest 
                                where TS : ANetApiResponse
                            {
                                ANetApiResponse response = null;
                    Severity: Major
                    Found in Authorize.NET/Util/HttpUtility.cs - About 3 hrs to fix

                      Method lineItemType has a Cognitive Complexity of 39 (exceeds 20 allowed). Consider refactoring.
                      Open

                              public static void lineItemType(lineItemType argument)
                              {
                                  if (null != argument)
                                  {
                                      if (argument.taxable) { argument.taxableSpecified = true;
                      Severity: Minor
                      Found in Authorize.NET/Api/Contracts/V1/RequestFactoryWithSpecified.cs - About 3 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Method AllEnumTest has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring.
                      Open

                              [Test]
                              public void AllEnumTest()
                              {
                      
                                  foreach (var anEnum in Enum.GetValues(typeof(messageTypeEnum)))
                      Severity: Minor
                      Found in AuthorizeNETtest/Api/Controllers/Test/AllGeneratedEnumTest.cs - About 3 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Method PostData has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring.
                      Open

                              public static ANetApiResponse PostData<TQ, TS>(AuthorizeNet.Environment env, TQ request) 
                                  where TQ : ANetApiRequest 
                                  where TS : ANetApiResponse
                              {
                                  ANetApiResponse response = null;
                      Severity: Minor
                      Found in Authorize.NET/Util/HttpUtility.cs - About 3 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      File AllGeneratedEnumTest.cs has 293 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      namespace AuthorizeNet.Api.Controllers.Test
                      {
                          using System;
                          using AuthorizeNet.Api.Contracts.V1;
                          using NUnit.Framework;
                      Severity: Minor
                      Found in AuthorizeNETtest/Api/Controllers/Test/AllGeneratedEnumTest.cs - About 3 hrs to fix

                        Class ApiCoreTestBase has 26 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                            [TestFixture]
                            public abstract class ApiCoreTestBase {
                        
                                protected static readonly Log Logger = LogFactory.getLog(typeof(ApiCoreTestBase));
                            
                        Severity: Minor
                        Found in AuthorizeNETtest/Api/Controllers/Test/ApiCoreTestBase.cs - About 3 hrs to fix

                          Method ShowProperties has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
                          Open

                                  public static void ShowProperties(Object bean) {  
                                      if ( null == bean) { return; }
                          
                                      try
                                      {
                          Severity: Minor
                          Found in AuthorizeNETtest/Api/Controllers/Test/ApiCoreTestBase.cs - About 2 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          File CreateTransactionTest.cs has 282 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          using System.Diagnostics;
                          
                          namespace AuthorizeNet.Api.Controllers.Test
                          {
                              using System;
                          Severity: Minor
                          Found in AuthorizeNETtest/Api/Controllers/Test/CreateTransactionTest.cs - About 2 hrs to fix

                            Method SampleCodeGetSubscriptionList has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    [Test]
                                    public void SampleCodeGetSubscriptionList()
                                    {
                                        LogHelper.info(Logger, "Sample GetSubscriptionList");
                            
                            

                              Method MockgetCustomerPaymentProfileListTest has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      [Test]
                                      public void MockgetCustomerPaymentProfileListTest()
                                      {
                                          //define all mocked objects as final
                                          var mockController = GetMockController<getCustomerPaymentProfileListRequest, getCustomerPaymentProfileListResponse>();

                                Method CreateCustomerProfileFromECheckTransaction has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        [Test]
                                        public void CreateCustomerProfileFromECheckTransaction()
                                        {
                                            var rnd = new AnetRandom(DateTime.Now.Millisecond);
                                            string customerIndx = rnd.Next(99999).ToString();
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language