Ontica/Empiria.Trade

View on GitHub

Showing 153 of 183 total issues

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

using System;

namespace Empiria.Trade.Products {

  /// <summary>Represents a product's group.</summary>
Severity: Major
Found in Core/Products/Domain/ProductGroup.cs and 1 other location - About 3 hrs to fix
Core/Products/Domain/ProductSubgroup.cs on lines 10..110

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

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

using System;

namespace Empiria.Trade.Products {

  /// <summary>Represents a product's subgroup.</summary>
Severity: Major
Found in Core/Products/Domain/ProductSubgroup.cs and 1 other location - About 3 hrs to fix
Core/Products/Domain/ProductGroup.cs on lines 10..91

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

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

        static private FixedList<PackageForShippingDto> GetPackagesDtoByOrder(
                        FixedList<OrderPackageForShipping> orderPackages) {

            var packagesDto = new List<PackageForShippingDto>();

Sales/ShippingAndHandling/Packaging/Adapters/PackagingMapper.cs on lines 127..143
Sales/ShippingAndHandling/Shipping/Domain/ShippingHelper.cs on lines 313..331

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

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

    static private FixedList<WarehouseBinDto> GetWarehouseBinList(
                      FixedList<WarehouseBinForPacking> warehouseBins) {

      var whBinDto = new List<WarehouseBinDto>();

Sales/ShippingAndHandling/Shipping/Adapters/ShippingMapper.cs on lines 61..77
Sales/ShippingAndHandling/Shipping/Domain/ShippingHelper.cs on lines 313..331

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

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

        private FixedList<OrderPackageForShipping> GetPackagedListByOrder(
                FixedList<PackagedForItem> packagedForItem) {

            var packages = new List<OrderPackageForShipping>();

Sales/ShippingAndHandling/Packaging/Adapters/PackagingMapper.cs on lines 127..143
Sales/ShippingAndHandling/Shipping/Adapters/ShippingMapper.cs on lines 61..77

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

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 async Task<List<ShippingLabelDto>> GetShippingLabelsFromURI([FromRoute] string shippingUID) {

      var httpConfig = new HttpApiClientConfig("http://apps.sujetsa.com.mx:8080", TimeSpan.FromSeconds(240));
      var http = httpConfig.HttpApiClient();
      var uri = $"/api/v4/trade/sales/shipping/{shippingUID}/label-pallets";
Severity: Major
Found in Reporting/WebApi.Client/Services/ShippingLabelService.cs and 1 other location - About 1 hr to fix
Reporting/WebApi.Client/Services/ShippingLabelService.cs on lines 20..28

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

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 async Task<List<SupplyLabelDto>> GetShippingLabelFromURI([FromRoute] string shippingUID) {

      var httpConfig = new HttpApiClientConfig("http://apps.sujetsa.com.mx:8080", TimeSpan.FromSeconds(240));
      var http = httpConfig.HttpApiClient();
      var uri = $"/api/v4/trade/sales/shipping/supply/{shippingUID}/labels";
Severity: Major
Found in Reporting/WebApi.Client/Services/ShippingLabelService.cs and 1 other location - About 1 hr to fix
Reporting/WebApi.Client/Services/ShippingLabelService.cs on lines 9..17

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

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

    [HttpPut]
    [Route("v4/trade/financial/money-accounts/{moneyAccountUID:guid}")]
    public SingleObjectModel UpdateMoneyAccount([FromUri] string moneyAccountUID, [FromBody] MoneyAccountFields fields) {

      base.RequireResource(moneyAccountUID, "moneyAccountUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 2 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 187..201
WebApi/Financial/MoneyAccountController.cs on lines 269..283

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

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

    [HttpPut]
    [Route("v4/trade/financial/money-accounts/transactions/transaction-item/{moneyAccountTransactionItemUID:guid}")]
    public SingleObjectModel UpdateMoneyAccountTransactionItem([FromUri] string moneyAccountTransactionItemUID, [FromBody] MoneyAccountTransactionItemFields fields) {

      base.RequireResource(moneyAccountTransactionItemUID, "moneyAccountTransactionItemUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 2 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 95..109
WebApi/Financial/MoneyAccountController.cs on lines 187..201

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

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

    [HttpPut]
    [Route("v4/trade/financial/money-accounts/transactions/{moneyAccountTransactionUID:guid}")]
    public SingleObjectModel UpdateMoneyAccountTransaction([FromUri] string moneyAccountTransactionUID, [FromBody] MoneyAccountTransactionFields fields) {

      base.RequireResource(moneyAccountTransactionUID, "moneyAccountTransactionUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 2 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 95..109
WebApi/Financial/MoneyAccountController.cs on lines 269..283

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

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

        [HttpPost]
        [Route("v4/trade/products/search-products")]
        public async Task<CollectionModel> GetProductsDto([FromBody] ProductQuery query)
        {
            RequireBody(query);
Severity: Major
Found in WebApi/Core/ProductController.cs and 1 other location - About 1 hr to fix
WebApi/Core/ProductController.cs on lines 77..89

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

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

        [HttpPost]
        [Route("v4/trade/products/search-products-for-order")]
        public async Task<CollectionModel> GetProductsByCustomer([FromBody] ProductOrderQuery query)
        {
            RequireBody(query);
Severity: Major
Found in WebApi/Core/ProductController.cs and 1 other location - About 1 hr to fix
WebApi/Core/ProductController.cs on lines 47..59

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

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

    [HttpGet]
    [Route("v4/trade/contacts/customers")]
    public CollectionModel GetCustomers([FromUri] string keywords) {

      base.RequireResource(keywords, "keywords");
Severity: Major
Found in WebApi/Core/PartyController.cs and 1 other location - About 1 hr to fix
WebApi/Core/PartyController.cs on lines 27..38

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

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

    [HttpGet]
    [Route("v4/trade/contacts/account-holders")]
    public CollectionModel GetAccountHolders([FromUri] string keywords) {

      base.RequireResource(keywords, "keywords");
Severity: Major
Found in WebApi/Core/PartyController.cs and 1 other location - About 1 hr to fix
WebApi/Core/PartyController.cs on lines 40..51

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

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

    [HttpGet]
    [Route("v4/trade/financial/money-accounts/{moneyaccountUID:guid}")]
    public SingleObjectModel GetMoneyAccount([FromUri] string moneyAccountUID) {

      base.RequireResource(moneyAccountUID, "orderUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 12 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 112..125
WebApi/Financial/MoneyAccountController.cs on lines 127..140
WebApi/Financial/MoneyAccountController.cs on lines 143..156
WebApi/Financial/MoneyAccountController.cs on lines 158..171
WebApi/Financial/MoneyAccountController.cs on lines 203..216
WebApi/Financial/MoneyAccountController.cs on lines 218..231
WebApi/Financial/MoneyAccountController.cs on lines 285..298
WebApi/Sales/SalesOrderController.cs on lines 60..73
WebApi/Sales/SalesOrderController.cs on lines 75..88
WebApi/Sales/SalesOrderController.cs on lines 192..204
WebApi/Sales/SalesOrderController.cs on lines 206..218
WebApi/Sales/SalesOrderController.cs on lines 220..232

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

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

    [HttpPost]
    [Route("v4/trade/financial/money-accounts/{moneyAccountUID:guid}/suspend")]
    public SingleObjectModel SuspendMoneyOrder([FromUri] string moneyAccountUID) {

      base.RequireResource(moneyAccountUID, "moneyAccountUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 12 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 67..79
WebApi/Financial/MoneyAccountController.cs on lines 112..125
WebApi/Financial/MoneyAccountController.cs on lines 143..156
WebApi/Financial/MoneyAccountController.cs on lines 158..171
WebApi/Financial/MoneyAccountController.cs on lines 203..216
WebApi/Financial/MoneyAccountController.cs on lines 218..231
WebApi/Financial/MoneyAccountController.cs on lines 285..298
WebApi/Sales/SalesOrderController.cs on lines 60..73
WebApi/Sales/SalesOrderController.cs on lines 75..88
WebApi/Sales/SalesOrderController.cs on lines 192..204
WebApi/Sales/SalesOrderController.cs on lines 206..218
WebApi/Sales/SalesOrderController.cs on lines 220..232

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

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

    [HttpPost]
    [Route("v4/trade/financial/money-accounts/{moneyAccountUID:guid}/active")]
    public SingleObjectModel ActiveMoneyOrder([FromUri] string moneyAccountUID) {

      base.RequireResource(moneyAccountUID, "moneyAccountUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 12 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 67..79
WebApi/Financial/MoneyAccountController.cs on lines 112..125
WebApi/Financial/MoneyAccountController.cs on lines 127..140
WebApi/Financial/MoneyAccountController.cs on lines 143..156
WebApi/Financial/MoneyAccountController.cs on lines 203..216
WebApi/Financial/MoneyAccountController.cs on lines 218..231
WebApi/Financial/MoneyAccountController.cs on lines 285..298
WebApi/Sales/SalesOrderController.cs on lines 60..73
WebApi/Sales/SalesOrderController.cs on lines 75..88
WebApi/Sales/SalesOrderController.cs on lines 192..204
WebApi/Sales/SalesOrderController.cs on lines 206..218
WebApi/Sales/SalesOrderController.cs on lines 220..232

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

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

    [HttpGet]
    [Route("v4/trade/financial/money-accounts/money-accounts-transaction/{moneyAccountTransactionUID:guid}")]
    public SingleObjectModel GetMoneyAccountTransaction([FromUri] string moneyAccountTransactionUID) {

      base.RequireResource(moneyAccountTransactionUID, "moneyAccountTransactionUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 12 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 67..79
WebApi/Financial/MoneyAccountController.cs on lines 112..125
WebApi/Financial/MoneyAccountController.cs on lines 127..140
WebApi/Financial/MoneyAccountController.cs on lines 143..156
WebApi/Financial/MoneyAccountController.cs on lines 158..171
WebApi/Financial/MoneyAccountController.cs on lines 203..216
WebApi/Financial/MoneyAccountController.cs on lines 285..298
WebApi/Sales/SalesOrderController.cs on lines 60..73
WebApi/Sales/SalesOrderController.cs on lines 75..88
WebApi/Sales/SalesOrderController.cs on lines 192..204
WebApi/Sales/SalesOrderController.cs on lines 206..218
WebApi/Sales/SalesOrderController.cs on lines 220..232

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

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

    [HttpDelete]
    [Route("v4/trade/financial/money-accounts/{moneyAccountUID:guid}/cancel")]
    public SingleObjectModel CancelMoneyAccount([FromUri] string moneyAccountUID) {

      base.RequireResource(moneyAccountUID, "moneyAccountUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 12 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 67..79
WebApi/Financial/MoneyAccountController.cs on lines 127..140
WebApi/Financial/MoneyAccountController.cs on lines 143..156
WebApi/Financial/MoneyAccountController.cs on lines 158..171
WebApi/Financial/MoneyAccountController.cs on lines 203..216
WebApi/Financial/MoneyAccountController.cs on lines 218..231
WebApi/Financial/MoneyAccountController.cs on lines 285..298
WebApi/Sales/SalesOrderController.cs on lines 60..73
WebApi/Sales/SalesOrderController.cs on lines 75..88
WebApi/Sales/SalesOrderController.cs on lines 192..204
WebApi/Sales/SalesOrderController.cs on lines 206..218
WebApi/Sales/SalesOrderController.cs on lines 220..232

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

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

    [HttpDelete]
    [Route("v4/trade/financial/money-accounts/transactions/transaction-item/{moneyAccountTransactionItemUID:guid}/cancel")]
    public SingleObjectModel CancelMoneyAccountTransactionItem([FromUri] string moneyAccountTransactionItemUID) {

      base.RequireResource(moneyAccountTransactionItemUID, "moneyAccountTransactionItemUID");
Severity: Major
Found in WebApi/Financial/MoneyAccountController.cs and 12 other locations - About 1 hr to fix
WebApi/Financial/MoneyAccountController.cs on lines 67..79
WebApi/Financial/MoneyAccountController.cs on lines 112..125
WebApi/Financial/MoneyAccountController.cs on lines 127..140
WebApi/Financial/MoneyAccountController.cs on lines 143..156
WebApi/Financial/MoneyAccountController.cs on lines 158..171
WebApi/Financial/MoneyAccountController.cs on lines 203..216
WebApi/Financial/MoneyAccountController.cs on lines 218..231
WebApi/Sales/SalesOrderController.cs on lines 60..73
WebApi/Sales/SalesOrderController.cs on lines 75..88
WebApi/Sales/SalesOrderController.cs on lines 192..204
WebApi/Sales/SalesOrderController.cs on lines 206..218
WebApi/Sales/SalesOrderController.cs on lines 220..232

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

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