Code Duplication    Length = 31-31 lines in 2 locations

src/Oro/Bundle/MagentoBundle/Tests/Functional/Fixture/LoadMagentoChannel.php 2 locations

@@ 158-188 (lines=31) @@
155
     *
156
     * @return Cart
157
     */
158
    protected function createCart($billing, $shipping, Customer $customer, ArrayCollection $item, $status)
159
    {
160
        $cart = new Cart();
161
        $cart->setOriginId(100);
162
        $cart->setChannel($this->integration);
163
        $cart->setDataChannel($this->channel);
164
        $cart->setBillingAddress($billing);
165
        $cart->setShippingAddress($shipping);
166
        $cart->setCustomer($customer);
167
        $cart->setEmail('[email protected]');
168
        $cart->setCreatedAt(new \DateTime('now'));
169
        $cart->setUpdatedAt(new \DateTime('now'));
170
        $cart->setCartItems($item);
171
        $cart->setStatus($status);
172
        $cart->setItemsQty(0);
173
        $cart->setItemsCount(1);
174
        $cart->setBaseCurrencyCode('code');
175
        $cart->setStoreCurrencyCode('code');
176
        $cart->setQuoteCurrencyCode('USD');
177
        $cart->setStoreToBaseRate(12);
178
        $cart->setStoreToQuoteRate(12);
179
        $cart->setGrandTotal(2.54);
180
        $cart->setIsGuest(0);
181
        $cart->setStore($this->store);
182
        $cart->setOwner($this->getUser());
183
        $cart->setOrganization($this->organization);
184
185
        $this->em->persist($cart);
186
187
        return $cart;
188
    }
189
190
    /**
191
     * @param                 $billing
@@ 198-228 (lines=31) @@
195
     *
196
     * @return Cart
197
     */
198
    protected function createGuestCart($billing, $shipping, ArrayCollection $item, $status)
199
    {
200
        $cart = new Cart();
201
        $cart->setOriginId(101);
202
        $cart->setChannel($this->integration);
203
        $cart->setDataChannel($this->channel);
204
        $cart->setBillingAddress($billing);
205
        $cart->setShippingAddress($shipping);
206
        $cart->setCustomer(null);
207
        $cart->setEmail('[email protected]');
208
        $cart->setCreatedAt(new \DateTime('now'));
209
        $cart->setUpdatedAt(new \DateTime('now'));
210
        $cart->setCartItems($item);
211
        $cart->setStatus($status);
212
        $cart->setItemsQty(0);
213
        $cart->setItemsCount(1);
214
        $cart->setBaseCurrencyCode('code');
215
        $cart->setStoreCurrencyCode('code');
216
        $cart->setQuoteCurrencyCode('usd');
217
        $cart->setStoreToBaseRate(12);
218
        $cart->setStoreToQuoteRate(12);
219
        $cart->setGrandTotal(2.54);
220
        $cart->setIsGuest(1);
221
        $cart->setStore($this->store);
222
        $cart->setOwner($this->getUser());
223
        $cart->setOrganization($this->organization);
224
225
        $this->em->persist($cart);
226
227
        return $cart;
228
    }
229
230
    /**
231
     * @param $table