Code Duplication    Length = 7-10 lines in 2 locations

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(

src/Eccube/Service/OrderHelper.php 1 location

@@ 119-128 (lines=10) @@
116
    public function createPreOrderId()
117
    {
118
        // ランダムなpre_order_idを作成
119
        do {
120
            $preOrderId = sha1(Str::random(32));
121
122
            $Order = $this->orderRepository->findOneBy(
123
                [
124
                    'pre_order_id' => $preOrderId,
125
                    'OrderStatus' => $this->config['order_processing'],
126
                ]
127
            );
128
        } while ($Order);
129
130
        return $preOrderId;
131
    }