Code Duplication    Length = 7-10 lines in 2 locations

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(StringUtil::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(

src/Eccube/Service/OrderHelper.php 1 location

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