Code Duplication    Length = 10-12 lines in 2 locations

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

@@ 115-126 (lines=12) @@
112
    /**
113
     * {@inheritdoc}
114
     */
115
    public function prepare(ItemHolderInterface $itemHolder, PurchaseContext $context)
116
    {
117
        if (!$this->supports($itemHolder)) {
118
            return;
119
        }
120
121
        // ユーザの保有ポイントを減算
122
        $Customer = $itemHolder->getCustomer();
123
        if ($Customer) {
124
            $Customer->setPoint($Customer->getPoint() - $itemHolder->getUsePoint());
125
        }
126
    }
127
128
    /**
129
     * {@inheritdoc
@@ 139-148 (lines=10) @@
136
    /**
137
     * {@inheritdoc
138
     */
139
    public function rollback(ItemHolderInterface $itemHolder, PurchaseContext $context)
140
    {
141
        // 利用したポイントをユーザに戻す.
142
        if (!$this->supports($itemHolder)) {
143
            return;
144
        }
145
146
        $Customer = $itemHolder->getCustomer();
147
        $Customer->setPoint($Customer->getPoint() + $itemHolder->getUsePoint());
148
    }
149
150
    /*
151
     * Helper methods