Code Duplication    Length = 12-12 lines in 2 locations

src/Eccube/Repository/CustomerRepository.php 2 locations

@@ 320-331 (lines=12) @@
317
     * @param $app
318
     * @return string
319
     */
320
    public function getUniqueSecretKey($app)
321
    {
322
        $unique = Str::random(32);
323
        $Customer = $this->findBy(array(
324
            'secret_key' => $unique,
325
        ));
326
        if (count($Customer) == 0) {
327
            return $unique;
328
        } else {
329
            return $this->getUniqueSecretKey($app);
330
        }
331
    }
332
333
    /**
334
     * ユニークなパスワードリセットキーを返す
@@ 338-349 (lines=12) @@
335
     * @param $app
336
     * @return string
337
     */
338
    public function getUniqueResetKey($app)
339
    {
340
        $unique = Str::random(32);
341
        $Customer = $this->findBy(array(
342
                        'reset_key' => $unique,
343
        ));
344
        if (count($Customer) == 0) {
345
            return $unique;
346
        } else {
347
            return $this->getUniqueResetKey($app);
348
        }
349
    }
350
351
    /**
352
     * saltを生成する