Code Duplication    Length = 10-10 lines in 2 locations

src/Eccube/Service/PurchaseFlow/Processor/PointProcessor.php 2 locations

@@ 122-131 (lines=10) @@
119
    /**
120
     * {@inheritdoc}
121
     */
122
    public function prepare(ItemHolderInterface $itemHolder, PurchaseContext $context)
123
    {
124
        if (!$this->supports($itemHolder)) {
125
            return;
126
        }
127
128
        // ユーザの保有ポイントを減算
129
        $Customer = $itemHolder->getCustomer();
130
        $Customer->setPoint($Customer->getPoint() - $itemHolder->getUsePoint());
131
    }
132
133
    /**
134
     * {@inheritdoc
@@ 144-153 (lines=10) @@
141
    /**
142
     * {@inheritdoc
143
     */
144
    public function rollback(ItemHolderInterface $itemHolder, PurchaseContext $context)
145
    {
146
        // 利用したポイントをユーザに戻す.
147
        if (!$this->supports($itemHolder)) {
148
            return;
149
        }
150
151
        $Customer = $itemHolder->getCustomer();
152
        $Customer->setPoint($Customer->getPoint() + $itemHolder->getUsePoint());
153
    }
154
155
    /*
156
     * Helper methods