Code Duplication    Length = 16-16 lines in 2 locations

src/Gateways/ProductGateway.php 2 locations

@@ 71-86 (lines=16) @@
68
     * @return array
69
     * @author SL
70
     */
71
    public function getProductsInGroup($extId, $productGroup, $token)
72
    {
73
        $response = $this->fetchDocument(
74
            '/v4/installations/' . $extId . '/product-groups/' . $productGroup . '/products',
75
            $token,
76
            'getProductsByGroup'
77
        );
78
79
        $products = [];
80
81
        foreach($response as $product) {
82
            $products[] = ProductEntity::make($product);
83
        }
84
85
        return $products;
86
    }
87
88
    /**
89
     * author EA
@@ 111-126 (lines=16) @@
108
     * @param string $token
109
     * @return array
110
     */
111
    public function getProducts($installation, $token)
112
    {
113
        $response = $this->fetchDocument(
114
            '/v4/installations/' . $installation . '/products',
115
            $token,
116
            'listProducts'
117
        );
118
119
        $products = [];
120
121
        foreach($response as $product) {
122
            $products[] = ProductEntity::make($product);
123
        }
124
125
        return $products;
126
    }
127
}
128