Code Duplication    Length = 10-14 lines in 4 locations

src/OroCRM/Bundle/MagentoBundle/ImportExport/Strategy/NewsletterSubscriberWithExistingCustomerStrategy.php 1 location

@@ 15-24 (lines=10) @@
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function process($entity)
16
    {
17
        if (!$this->isProcessingAllowed($entity)) {
18
            $this->appendDataToContext(self::NEWSLETTER_SUBSCRIBER_POST_PROCESS, $this->context->getValue('itemData'));
19
20
            return null;
21
        }
22
23
        return parent::process($entity);
24
    }
25
26
    /**
27
     * @param NewsletterSubscriber $newsletterSubscriber

src/OroCRM/Bundle/MagentoBundle/ImportExport/Strategy/OrderWithExistingCustomerStrategy.php 1 location

@@ 21-30 (lines=10) @@
18
     *
19
     * {@inheritdoc}
20
     */
21
    public function process($importingOrder)
22
    {
23
        if (!$this->isProcessingAllowed($importingOrder)) {
24
            $this->appendDataToContext(self::CONTEXT_ORDER_POST_PROCESS, $this->context->getValue('itemData'));
25
26
            return null;
27
        }
28
29
        return parent::process($importingOrder);
30
    }
31
32
    /**
33
     * @param Order $order

src/OroCRM/Bundle/MagentoBundle/ImportExport/Strategy/CartStrategy.php 1 location

@@ 50-62 (lines=13) @@
47
     *
48
     * {@inheritdoc}
49
     */
50
    public function process($entity)
51
    {
52
        if (!$this->isProcessingAllowed($entity)) {
53
            $this->appendDataToContext(
54
                CartWithExistingCustomerStrategy::CONTEXT_CART_POST_PROCESS,
55
                $this->context->getValue('itemData')
56
            );
57
58
            return null;
59
        }
60
61
        return parent::process($entity);
62
    }
63
64
    /**
65
     * @param Cart $cart

src/OroCRM/Bundle/MagentoBundle/ImportExport/Strategy/CartWithExistingCustomerStrategy.php 1 location

@@ 12-25 (lines=14) @@
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function process($importingCart)
13
    {
14
        if (!$this->hasContactInfo($importingCart)) {
15
            return null;
16
        }
17
18
        if (!$this->isProcessingAllowed($importingCart)) {
19
            $this->appendDataToContext(self::CONTEXT_CART_POST_PROCESS, $this->context->getValue('itemData'));
20
21
            return null;
22
        }
23
24
        return parent::process($importingCart);
25
    }
26
}
27