Code Duplication    Length = 19-20 lines in 3 locations

Tests/Units/Model/Serializer.php 1 location

@@ 710-728 (lines=19) @@
707
    /**
708
     * @param string $idKey
709
     */
710
    private function getCartItemDetailMetadata($idKey)
711
    {
712
        $cartItemDetailMetadata = new ClassMetadata(
713
            'cart_item_details',
714
            'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail',
715
            ''
716
        );
717
718
        $cartItemDetailMetadata->setRelationList([
719
            new Relation('cartItem', Relation::MANY_TO_ONE, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem'),
720
        ]);
721
        $cartItemDetailMetadata->setAttributeList([
722
            new Attribute($idKey, 'id', 'string', true),
723
            new Attribute('name'),
724
            new Attribute('cartItem'),
725
        ]);
726
727
        return $cartItemDetailMetadata;
728
    }
729
730
    /**
731
     * @param string $idKey

Tests/Units/UnitOfWork.php 2 locations

@@ 856-874 (lines=19) @@
853
        return $mapping;
854
    }
855
856
    private function getOrderMetadata()
857
    {
858
        $orderMetadata = new ClassMetadata(
859
            'orders',
860
            'Mapado\RestClientSdk\Tests\Model\JsonLd\Order',
861
            ''
862
        );
863
864
        $orderMetadata->setAttributeList([
865
            new Attribute('@id', 'id', 'string', true),
866
            new Attribute('customerPaidAmount', 'customerPaidAmount', 'int'),
867
            new Attribute('status'),
868
        ]);
869
870
        $orderMetadata->setRelationList([
871
        ]);
872
873
        return $orderMetadata;
874
    }
875
876
    private function getCartMetadata()
877
    {
@@ 901-920 (lines=20) @@
898
        return $cartMetadata;
899
    }
900
901
    private function getCartItemMetadata()
902
    {
903
        $cartItemMetadata = new ClassMetadata(
904
            'cart_items',
905
            'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem',
906
            ''
907
        );
908
909
        $cartItemMetadata->setAttributeList([
910
            new Attribute('@id', 'id', 'string', true),
911
            new Attribute('amount'),
912
            new Attribute('cartItemDetailList'),
913
        ]);
914
915
        $cartItemMetadata->setRelationList([
916
            new Relation('cartItemDetailList', Relation::ONE_TO_MANY, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail'),
917
        ]);
918
919
        return $cartItemMetadata;
920
    }
921
922
    private function getCartItemDetailMetadata()
923
    {