Code Duplication    Length = 10-10 lines in 2 locations

src/Eccube/Controller/Admin/Customer/CustomerEditController.php 1 location

@@ 110-119 (lines=10) @@
107
                    $app['orm.em']->persist($CustomerAddress);
108
                }
109
110
                if ($Customer->getPassword() === $app['config']['default_password']) {
111
                    $Customer->setPassword($previous_password);
112
                } else {
113
                    if ($Customer->getSalt() === null) {
114
                        $Customer->setSalt($app['eccube.repository.customer']->createSalt(5));
115
                    }
116
                    $Customer->setPassword(
117
                        $app['eccube.repository.customer']->encryptPassword($app, $Customer)
118
                    );
119
                }
120
121
                $app['orm.em']->persist($Customer);
122
                $app['orm.em']->flush();

src/Eccube/Controller/Mypage/ChangeController.php 1 location

@@ 71-80 (lines=10) @@
68
69
            log_info('会員編集開始');
70
71
            if ($Customer->getPassword() === $app['config']['default_password']) {
72
                $Customer->setPassword($previous_password);
73
            } else {
74
                if ($Customer->getSalt() === null) {
75
                    $Customer->setSalt($app['eccube.repository.customer']->createSalt(5));
76
                }
77
                $Customer->setPassword(
78
                    $app['eccube.repository.customer']->encryptPassword($app, $Customer)
79
                );
80
            }
81
            $app['orm.em']->flush();
82
83
            log_info('会員編集完了');