Code Duplication    Length = 7-10 lines in 2 locations

src/Eccube/Service/OrderHelper.php 1 location

@@ 196-205 (lines=10) @@
193
    public function createPreOrderId()
194
    {
195
        // ランダムなpre_order_idを作成
196
        do {
197
            $preOrderId = sha1(StringUtil::random(32));
198
199
            $Order = $this->orderRepository->findOneBy(
200
                [
201
                    'pre_order_id' => $preOrderId,
202
                    'OrderStatus' => OrderStatus::PROCESSING,
203
                ]
204
            );
205
        } while ($Order);
206
207
        return $preOrderId;
208
    }

src/Eccube/Service/ShoppingService.php 1 location

@@ 320-326 (lines=7) @@
317
    public function createOrder($Customer)
318
    {
319
        // ランダムなpre_order_idを作成
320
        do {
321
            $preOrderId = sha1(StringUtil::random(32));
322
            $Order = $this->orderRepository->findOneBy([
323
                'pre_order_id' => $preOrderId,
324
                'OrderStatus' => OrderStatus::PROCESSING,
325
            ]);
326
        } while ($Order);
327
328
        // 受注情報、受注明細情報、お届け先情報、配送商品情報を作成
329
        $Order = $this->registerPreOrder(