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/>
File AnetApiSchema.generated.cs
has 3057 lines of code (exceeds 250 allowed). Consider refactoring. Open
namespace AuthorizeNet.APICore {
using System.Xml.Serialization;
/// <remarks/>
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
Class RequestFactoryWithSpecified
has 213 methods (exceeds 20 allowed). Consider refactoring. Open
public static class RequestFactoryWithSpecified
{
public static void decryptPaymentDataRequest(decryptPaymentDataRequest argument)
{
if (null != argument)
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)))
File ApiCoreTestBase.cs
has 523 lines of code (exceeds 250 allowed). Consider refactoring. Open
using AuthorizeNet.Utility;
namespace AuthorizeNet.Api.Controllers.Test
{
using System;
Method SetUp
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
[SetUp]
public void SetUp()
{
MockContext = new MockFactory();
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;
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;
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;
- Read upRead up
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)))
- Read upRead up
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;
- Read upRead up
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;
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));
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
{
- Read upRead up
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;
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();