Code Duplication    Length = 7-10 lines in 2 locations

src/Eccube/Service/ShoppingService.php 1 location

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

src/Eccube/Service/OrderHelper.php 1 location

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