Code Duplication    Length = 7-10 lines in 2 locations

src/Eccube/Service/OrderHelper.php 1 location

@@ 108-117 (lines=10) @@
105
    public function createPreOrderId()
106
    {
107
        // ランダムなpre_order_idを作成
108
        do {
109
            $preOrderId = sha1(Str::random(32));
110
111
            $Order = $this->orderRepository->findOneBy(
112
                [
113
                    'pre_order_id' => $preOrderId,
114
                    'OrderStatus' => $this->config['order_processing'],
115
                ]
116
            );
117
        } while ($Order);
118
119
        return $preOrderId;
120
    }

src/Eccube/Service/ShoppingService.php 1 location

@@ 145-151 (lines=7) @@
142
    public function createOrder($Customer)
143
    {
144
        // ランダムなpre_order_idを作成
145
        do {
146
            $preOrderId = sha1(Str::random(32));
147
            $Order = $this->app['eccube.repository.order']->findOneBy(array(
148
                'pre_order_id' => $preOrderId,
149
                'OrderStatus' => $this->app['config']['order_processing'],
150
            ));
151
        } while ($Order);
152
153
        // 受注情報、受注明細情報、お届け先情報、配送商品情報を作成
154
        $Order = $this->registerPreOrder(