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

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