inklabs/kommerce-core

View on GitHub

Showing 254 of 254 total issues

DTOBuilderFactory has 70 functions (exceeds 20 allowed). Consider refactoring.
Open

class DTOBuilderFactory implements DTOBuilderFactoryInterface
{
    public function getAddressDTOBuilder(Address $address)
    {
        return new AddressDTOBuilder($address, $this);
Severity: Major
Found in src/EntityDTO/Builder/DTOBuilderFactory.php - About 1 day to fix

    Function getHandler has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getHandler(string $handlerClassName, ActionInterface $action)
        {
            $reflection = new ReflectionClass($handlerClassName);
    
            $constructorParameters = [];
    Severity: Minor
    Found in src/Lib/Mapper.php - About 1 day 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

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

    <?php
    namespace inklabs\kommerce\Entity;
    
    use Symfony\Component\Validator\Mapping\ClassMetadata;
    use Symfony\Component\Validator\Constraints as Assert;
    Severity: Major
    Found in src/Entity/PromotionType.php and 2 other locations - About 7 hrs to fix
    src/Entity/OptionType.php on lines 1..68
    src/Entity/UserStatusType.php on lines 1..68

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

    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\Entity;
    
    use Symfony\Component\Validator\Mapping\ClassMetadata;
    use Symfony\Component\Validator\Constraints as Assert;
    Severity: Major
    Found in src/Entity/UserStatusType.php and 2 other locations - About 7 hrs to fix
    src/Entity/OptionType.php on lines 1..68
    src/Entity/PromotionType.php on lines 1..68

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

    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\Entity;
    
    use Symfony\Component\Validator\Mapping\ClassMetadata;
    use Symfony\Component\Validator\Constraints as Assert;
    Severity: Major
    Found in src/Entity/OptionType.php and 2 other locations - About 7 hrs to fix
    src/Entity/PromotionType.php on lines 1..68
    src/Entity/UserStatusType.php on lines 1..68

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

    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\Attribute;
    
    use inklabs\kommerce\Action\Attribute\GetProductAttributesByAttributeValueQuery;
    use inklabs\kommerce\ActionResponse\Attribute\GetProductAttributesByAttributeValueResponse;
    src/ActionHandler/Product/GetProductsByTagHandler.php on lines 1..65

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

    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\Product;
    
    use inklabs\kommerce\Action\Product\GetProductsByTagQuery;
    use inklabs\kommerce\ActionResponse\Product\GetProductsByTagResponse;
    Severity: Major
    Found in src/ActionHandler/Product/GetProductsByTagHandler.php and 1 other location - About 7 hrs to fix
    src/ActionHandler/Attribute/GetProductAttributesByAttributeValueHandler.php on lines 1..68

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

    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

    Product has 50 functions (exceeds 20 allowed). Consider refactoring.
    Open

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

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

      <?php
      namespace inklabs\kommerce\EntityDTO\Builder;
      
      use inklabs\kommerce\Entity\OrderItemOptionProduct;
      use inklabs\kommerce\EntityDTO\OrderItemOptionProductDTO;
      Severity: Major
      Found in src/EntityDTO/Builder/OrderItemOptionProductDTOBuilder.php and 1 other location - About 6 hrs to fix
      src/EntityDTO/Builder/OrderItemOptionValueDTOBuilder.php on lines 1..67

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

      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\OrderItemOptionValue;
      use inklabs\kommerce\EntityDTO\OrderItemOptionValueDTO;
      Severity: Major
      Found in src/EntityDTO/Builder/OrderItemOptionValueDTOBuilder.php and 1 other location - About 6 hrs to fix
      src/EntityDTO/Builder/OrderItemOptionProductDTOBuilder.php on lines 1..67

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Coupon;
      
      use inklabs\kommerce\Action\Coupon\ListCouponsQuery;
      use inklabs\kommerce\ActionResponse\Coupon\ListCouponsResponse;
      Severity: Major
      Found in src/ActionHandler/Coupon/ListCouponsHandler.php and 10 other locations - About 6 hrs to fix
      src/ActionHandler/Attribute/ListAttributesHandler.php on lines 1..59
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/CatalogPromotion/ListCatalogPromotionsHandler.php on lines 1..62
      src/ActionHandler/Option/ListOptionsHandler.php on lines 1..62
      src/ActionHandler/Product/ListProductsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/Tag/ListTagsHandler.php on lines 1..62
      src/ActionHandler/User/ListUsersHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListWarehousesHandler.php on lines 1..62

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Attribute;
      
      use inklabs\kommerce\Action\Attribute\ListAttributesQuery;
      use inklabs\kommerce\ActionResponse\Attribute\ListAttributesResponse;
      Severity: Major
      Found in src/ActionHandler/Attribute/ListAttributesHandler.php and 10 other locations - About 6 hrs to fix
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/CatalogPromotion/ListCatalogPromotionsHandler.php on lines 1..62
      src/ActionHandler/Coupon/ListCouponsHandler.php on lines 1..59
      src/ActionHandler/Option/ListOptionsHandler.php on lines 1..62
      src/ActionHandler/Product/ListProductsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/Tag/ListTagsHandler.php on lines 1..62
      src/ActionHandler/User/ListUsersHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListWarehousesHandler.php on lines 1..62

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\User;
      
      use inklabs\kommerce\Action\User\ListUsersQuery;
      use inklabs\kommerce\ActionResponse\User\ListUsersResponse;
      Severity: Major
      Found in src/ActionHandler/User/ListUsersHandler.php and 10 other locations - About 6 hrs to fix
      src/ActionHandler/Attribute/ListAttributesHandler.php on lines 1..59
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/CatalogPromotion/ListCatalogPromotionsHandler.php on lines 1..62
      src/ActionHandler/Coupon/ListCouponsHandler.php on lines 1..59
      src/ActionHandler/Option/ListOptionsHandler.php on lines 1..62
      src/ActionHandler/Product/ListProductsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/Tag/ListTagsHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListWarehousesHandler.php on lines 1..62

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Warehouse;
      
      use inklabs\kommerce\Action\Warehouse\ListWarehousesQuery;
      use inklabs\kommerce\ActionResponse\Warehouse\ListWarehousesResponse;
      Severity: Major
      Found in src/ActionHandler/Warehouse/ListWarehousesHandler.php and 10 other locations - About 6 hrs to fix
      src/ActionHandler/Attribute/ListAttributesHandler.php on lines 1..59
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/CatalogPromotion/ListCatalogPromotionsHandler.php on lines 1..62
      src/ActionHandler/Coupon/ListCouponsHandler.php on lines 1..59
      src/ActionHandler/Option/ListOptionsHandler.php on lines 1..62
      src/ActionHandler/Product/ListProductsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/Tag/ListTagsHandler.php on lines 1..62
      src/ActionHandler/User/ListUsersHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\CatalogPromotion;
      
      use inklabs\kommerce\Action\CatalogPromotion\ListCatalogPromotionsQuery;
      use inklabs\kommerce\ActionResponse\CatalogPromotion\ListCatalogPromotionsResponse;
      src/ActionHandler/Attribute/ListAttributesHandler.php on lines 1..59
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/Coupon/ListCouponsHandler.php on lines 1..59
      src/ActionHandler/Option/ListOptionsHandler.php on lines 1..62
      src/ActionHandler/Product/ListProductsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/Tag/ListTagsHandler.php on lines 1..62
      src/ActionHandler/User/ListUsersHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListWarehousesHandler.php on lines 1..62

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Option;
      
      use inklabs\kommerce\Action\Option\ListOptionsQuery;
      use inklabs\kommerce\ActionResponse\Option\ListOptionsResponse;
      Severity: Major
      Found in src/ActionHandler/Option/ListOptionsHandler.php and 10 other locations - About 6 hrs to fix
      src/ActionHandler/Attribute/ListAttributesHandler.php on lines 1..59
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/CatalogPromotion/ListCatalogPromotionsHandler.php on lines 1..62
      src/ActionHandler/Coupon/ListCouponsHandler.php on lines 1..59
      src/ActionHandler/Product/ListProductsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/Tag/ListTagsHandler.php on lines 1..62
      src/ActionHandler/User/ListUsersHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListWarehousesHandler.php on lines 1..62

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Tag;
      
      use inklabs\kommerce\Action\Tag\ListTagsQuery;
      use inklabs\kommerce\ActionResponse\Tag\ListTagsResponse;
      Severity: Major
      Found in src/ActionHandler/Tag/ListTagsHandler.php and 10 other locations - About 6 hrs to fix
      src/ActionHandler/Attribute/ListAttributesHandler.php on lines 1..59
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/CatalogPromotion/ListCatalogPromotionsHandler.php on lines 1..62
      src/ActionHandler/Coupon/ListCouponsHandler.php on lines 1..59
      src/ActionHandler/Option/ListOptionsHandler.php on lines 1..62
      src/ActionHandler/Product/ListProductsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/User/ListUsersHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListWarehousesHandler.php on lines 1..62

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

      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\CartPriceRule;
      
      use inklabs\kommerce\Action\CartPriceRule\CreateCartPriceRuleTagItemCommand;
      use inklabs\kommerce\Entity\CartPriceRuleTagItem;
      src/ActionHandler/CartPriceRule/CreateCartPriceRuleProductItemHandler.php on lines 1..62

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

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

      <?php
      namespace inklabs\kommerce\ActionHandler\Product;
      
      use inklabs\kommerce\Action\Product\ListProductsQuery;
      use inklabs\kommerce\ActionResponse\Product\ListProductsResponse;
      Severity: Major
      Found in src/ActionHandler/Product/ListProductsHandler.php and 10 other locations - About 6 hrs to fix
      src/ActionHandler/Attribute/ListAttributesHandler.php on lines 1..59
      src/ActionHandler/CartPriceRule/ListCartPriceRulesHandler.php on lines 1..62
      src/ActionHandler/CatalogPromotion/ListCatalogPromotionsHandler.php on lines 1..62
      src/ActionHandler/Coupon/ListCouponsHandler.php on lines 1..59
      src/ActionHandler/Option/ListOptionsHandler.php on lines 1..62
      src/ActionHandler/Shipment/ListAdHocShipmentsHandler.php on lines 1..62
      src/ActionHandler/Tag/ListTagsHandler.php on lines 1..62
      src/ActionHandler/User/ListUsersHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListInventoryTransactionsByInventoryLocationHandler.php on lines 1..62
      src/ActionHandler/Warehouse/ListWarehousesHandler.php on lines 1..62

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

      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\CartPriceRule;
      
      use inklabs\kommerce\Action\CartPriceRule\CreateCartPriceRuleProductItemCommand;
      use inklabs\kommerce\Entity\CartPriceRuleProductItem;
      src/ActionHandler/CartPriceRule/CreateCartPriceRuleTagItemHandler.php on lines 1..62

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

      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