Code Duplication    Length = 7-10 lines in 2 locations

src/Eccube/Service/OrderHelper.php 1 location

@@ 145-154 (lines=10) @@
142
    public function createPreOrderId()
143
    {
144
        // ランダムなpre_order_idを作成
145
        do {
146
            $preOrderId = sha1(Str::random(32));
147
148
            $Order = $this->orderRepository->findOneBy(
149
                [
150
                    'pre_order_id' => $preOrderId,
151
                    'OrderStatus' => $this->appConfig['order_processing'],
152
                ]
153
            );
154
        } while ($Order);
155
156
        return $preOrderId;
157
    }

src/Eccube/Service/ShoppingService.php 1 location

@@ 265-271 (lines=7) @@
262
    public function createOrder($Customer)
263
    {
264
        // ランダムなpre_order_idを作成
265
        do {
266
            $preOrderId = sha1(Str::random(32));
267
            $Order = $this->orderRepository->findOneBy(array(
268
                'pre_order_id' => $preOrderId,
269
                'OrderStatus' => $this->appConfig['order_processing'],
270
            ));
271
        } while ($Order);
272
273
        // 受注情報、受注明細情報、お届け先情報、配送商品情報を作成
274
        $Order = $this->registerPreOrder(