Code Duplication    Length = 7-10 lines in 2 locations

src/Eccube/Service/OrderHelper.php 1 location

@@ 138-147 (lines=10) @@
135
    public function createPreOrderId()
136
    {
137
        // ランダムなpre_order_idを作成
138
        do {
139
            $preOrderId = sha1(Str::random(32));
140
141
            $Order = $this->orderRepository->findOneBy(
142
                [
143
                    'pre_order_id' => $preOrderId,
144
                    'OrderStatus' => $this->appConfig['order_processing'],
145
                ]
146
            );
147
        } while ($Order);
148
149
        return $preOrderId;
150
    }

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(