inklabs/kommerce-core

View on GitHub

Showing 254 of 254 total issues

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

<?php
namespace inklabs\kommerce\ActionHandler\Tag;

use inklabs\kommerce\Action\Tag\GetTagsByIdsQuery;
use inklabs\kommerce\ActionResponse\Tag\GetTagsByIdsResponse;
Severity: Major
Found in src/ActionHandler/Tag/GetTagsByIdsHandler.php and 1 other location - About 3 hrs to fix
src/ActionHandler/Configuration/GetConfigurationsByKeysHandler.php on lines 1..53

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

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

<?php
namespace inklabs\kommerce\ActionResponse\CatalogPromotion;

use inklabs\kommerce\EntityDTO\Builder\PaginationDTOBuilder;
use inklabs\kommerce\EntityDTO\Builder\CatalogPromotionDTOBuilder;
src/ActionResponse/Order/ListOrdersResponse.php on lines 1..58

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

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

<?php
namespace inklabs\kommerce\ActionResponse\Order;

use inklabs\kommerce\EntityDTO\Builder\PaginationDTOBuilder;
use inklabs\kommerce\EntityDTO\Builder\OrderDTOBuilder;
Severity: Major
Found in src/ActionResponse/Order/ListOrdersResponse.php and 1 other location - About 3 hrs to fix
src/ActionResponse/CatalogPromotion/ListCatalogPromotionsResponse.php on lines 1..58

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

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

OrderAddress has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

class OrderAddress implements ValidationInterface
{
    /** @var string|null */
    protected $firstName;

Severity: Minor
Found in src/Entity/OrderAddress.php - About 3 hrs to fix

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

    <?php
    namespace inklabs\kommerce\ActionHandler\Option;
    
    use inklabs\kommerce\Action\Option\UpdateOptionProductCommand;
    use inklabs\kommerce\EntityDTO\Builder\OptionProductDTOBuilder;
    Severity: Major
    Found in src/ActionHandler/Option/UpdateOptionProductHandler.php and 1 other location - About 3 hrs to fix
    src/ActionHandler/Option/UpdateOptionValueHandler.php on lines 1..47

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

    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

    <?php
    namespace inklabs\kommerce\ActionHandler\Option;
    
    use inklabs\kommerce\Action\Option\UpdateOptionValueCommand;
    use inklabs\kommerce\EntityDTO\Builder\OptionValueDTOBuilder;
    Severity: Major
    Found in src/ActionHandler/Option/UpdateOptionValueHandler.php and 1 other location - About 3 hrs to fix
    src/ActionHandler/Option/UpdateOptionProductHandler.php on lines 1..45

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

    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

    Cart has 28 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Cart implements IdEntityInterface
    {
        use TimeTrait, IdTrait;
    
        /** @var string|null */
    Severity: Minor
    Found in src/Entity/Cart.php - About 3 hrs to fix

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

      <?php
      namespace inklabs\kommerce\ActionHandler\CatalogPromotion;
      
      use inklabs\kommerce\Action\CatalogPromotion\GetCatalogPromotionQuery;
      use inklabs\kommerce\ActionResponse\CatalogPromotion\GetCatalogPromotionResponse;
      src/ActionHandler/Attribute/GetAttributeHandler.php on lines 1..51
      src/ActionHandler/Attribute/GetAttributeValueHandler.php on lines 1..51
      src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php on lines 1..51
      src/ActionHandler/Coupon/GetCouponHandler.php on lines 1..51
      src/ActionHandler/Shipment/GetShipmentTrackerHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetInventoryLocationHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetWarehouseHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Coupon;
      
      use inklabs\kommerce\Action\Coupon\GetCouponQuery;
      use inklabs\kommerce\ActionResponse\Coupon\GetCouponResponse;
      Severity: Major
      Found in src/ActionHandler/Coupon/GetCouponHandler.php and 7 other locations - About 3 hrs to fix
      src/ActionHandler/Attribute/GetAttributeHandler.php on lines 1..51
      src/ActionHandler/Attribute/GetAttributeValueHandler.php on lines 1..51
      src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php on lines 1..51
      src/ActionHandler/CatalogPromotion/GetCatalogPromotionHandler.php on lines 1..51
      src/ActionHandler/Shipment/GetShipmentTrackerHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetInventoryLocationHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetWarehouseHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Shipment;
      
      use inklabs\kommerce\Action\Shipment\GetShipmentTrackerQuery;
      use inklabs\kommerce\ActionResponse\Shipment\GetShipmentTrackerResponse;
      Severity: Major
      Found in src/ActionHandler/Shipment/GetShipmentTrackerHandler.php and 7 other locations - About 3 hrs to fix
      src/ActionHandler/Attribute/GetAttributeHandler.php on lines 1..51
      src/ActionHandler/Attribute/GetAttributeValueHandler.php on lines 1..51
      src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php on lines 1..51
      src/ActionHandler/CatalogPromotion/GetCatalogPromotionHandler.php on lines 1..51
      src/ActionHandler/Coupon/GetCouponHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetInventoryLocationHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetWarehouseHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Attribute;
      
      use inklabs\kommerce\Action\Attribute\GetAttributeValueQuery;
      use inklabs\kommerce\ActionResponse\Attribute\GetAttributeValueResponse;
      Severity: Major
      Found in src/ActionHandler/Attribute/GetAttributeValueHandler.php and 7 other locations - About 3 hrs to fix
      src/ActionHandler/Attribute/GetAttributeHandler.php on lines 1..51
      src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php on lines 1..51
      src/ActionHandler/CatalogPromotion/GetCatalogPromotionHandler.php on lines 1..51
      src/ActionHandler/Coupon/GetCouponHandler.php on lines 1..51
      src/ActionHandler/Shipment/GetShipmentTrackerHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetInventoryLocationHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetWarehouseHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Warehouse;
      
      use inklabs\kommerce\Action\Warehouse\GetInventoryLocationQuery;
      use inklabs\kommerce\ActionResponse\Warehouse\GetInventoryLocationResponse;
      Severity: Major
      Found in src/ActionHandler/Warehouse/GetInventoryLocationHandler.php and 7 other locations - About 3 hrs to fix
      src/ActionHandler/Attribute/GetAttributeHandler.php on lines 1..51
      src/ActionHandler/Attribute/GetAttributeValueHandler.php on lines 1..51
      src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php on lines 1..51
      src/ActionHandler/CatalogPromotion/GetCatalogPromotionHandler.php on lines 1..51
      src/ActionHandler/Coupon/GetCouponHandler.php on lines 1..51
      src/ActionHandler/Shipment/GetShipmentTrackerHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetWarehouseHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Warehouse;
      
      use inklabs\kommerce\Action\Warehouse\GetWarehouseQuery;
      use inklabs\kommerce\ActionResponse\Warehouse\GetWarehouseResponse;
      Severity: Major
      Found in src/ActionHandler/Warehouse/GetWarehouseHandler.php and 7 other locations - About 3 hrs to fix
      src/ActionHandler/Attribute/GetAttributeHandler.php on lines 1..51
      src/ActionHandler/Attribute/GetAttributeValueHandler.php on lines 1..51
      src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php on lines 1..51
      src/ActionHandler/CatalogPromotion/GetCatalogPromotionHandler.php on lines 1..51
      src/ActionHandler/Coupon/GetCouponHandler.php on lines 1..51
      src/ActionHandler/Shipment/GetShipmentTrackerHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetInventoryLocationHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\ActionHandler\CartPriceRule;
      
      use inklabs\kommerce\Action\CartPriceRule\GetCartPriceRuleQuery;
      use inklabs\kommerce\ActionResponse\CartPriceRule\GetCartPriceRuleResponse;
      Severity: Major
      Found in src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php and 7 other locations - About 3 hrs to fix
      src/ActionHandler/Attribute/GetAttributeHandler.php on lines 1..51
      src/ActionHandler/Attribute/GetAttributeValueHandler.php on lines 1..51
      src/ActionHandler/CatalogPromotion/GetCatalogPromotionHandler.php on lines 1..51
      src/ActionHandler/Coupon/GetCouponHandler.php on lines 1..51
      src/ActionHandler/Shipment/GetShipmentTrackerHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetInventoryLocationHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetWarehouseHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Attribute;
      
      use inklabs\kommerce\Action\Attribute\GetAttributeQuery;
      use inklabs\kommerce\ActionResponse\Attribute\GetAttributeResponse;
      Severity: Major
      Found in src/ActionHandler/Attribute/GetAttributeHandler.php and 7 other locations - About 3 hrs to fix
      src/ActionHandler/Attribute/GetAttributeValueHandler.php on lines 1..51
      src/ActionHandler/CartPriceRule/GetCartPriceRuleHandler.php on lines 1..51
      src/ActionHandler/CatalogPromotion/GetCatalogPromotionHandler.php on lines 1..51
      src/ActionHandler/Coupon/GetCouponHandler.php on lines 1..51
      src/ActionHandler/Shipment/GetShipmentTrackerHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetInventoryLocationHandler.php on lines 1..51
      src/ActionHandler/Warehouse/GetWarehouseHandler.php on lines 1..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 148.

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

      <?php
      namespace inklabs\kommerce\Entity;
      
      use Doctrine\Common\Collections\ArrayCollection;
      use inklabs\kommerce\Exception\InsufficientInventoryException;
      Severity: Minor
      Found in src/Entity/Product.php - About 3 hrs to fix

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

        <?php
        namespace inklabs\kommerce\Action\CartPriceRule;
        
        use inklabs\kommerce\Lib\Command\CommandInterface;
        use inklabs\kommerce\Lib\Uuid;
        src/Action/CartPriceRule/CreateCartPriceRuleDiscountCommand.php on lines 1..49
        src/Action/CartPriceRule/CreateCartPriceRuleTagItemCommand.php on lines 1..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 143.

        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

        <?php
        namespace inklabs\kommerce\EntityDTO\Builder;
        
        use inklabs\kommerce\Entity\UserRole;
        use inklabs\kommerce\EntityDTO\UserRoleDTO;
        Severity: Major
        Found in src/EntityDTO/Builder/UserRoleDTOBuilder.php and 1 other location - About 3 hrs to fix
        src/EntityDTO/Builder/ShipmentItemDTOBuilder.php on lines 1..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 143.

        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

        <?php
        namespace inklabs\kommerce\EntityDTO\Builder;
        
        use inklabs\kommerce\Entity\ShipmentItem;
        use inklabs\kommerce\EntityDTO\ShipmentItemDTO;
        Severity: Major
        Found in src/EntityDTO/Builder/ShipmentItemDTOBuilder.php and 1 other location - About 3 hrs to fix
        src/EntityDTO/Builder/UserRoleDTOBuilder.php on lines 1..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 143.

        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

        <?php
        namespace inklabs\kommerce\Action\CartPriceRule;
        
        use inklabs\kommerce\Lib\Command\CommandInterface;
        use inklabs\kommerce\Lib\Uuid;
        src/Action/CartPriceRule/CreateCartPriceRuleProductItemCommand.php on lines 1..49
        src/Action/CartPriceRule/CreateCartPriceRuleTagItemCommand.php on lines 1..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 143.

        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