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

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