Code Duplication    Length = 17-19 lines in 2 locations

Controller/Adminhtml/Adminlogin/Verify.php 1 location

@@ 93-109 (lines=17) @@
90
     * @return \Magento\Framework\Controller\ResultInterface|ResponseInterface
91
     * @throws \Magento\Framework\Exception\NotFoundException
92
     */
93
    public function execute()
94
    {
95
        if ($this->shouldActionBeRun() === false) {
96
            return $this->getRedirectAction();
97
        }
98
99
        $secret    = $this->getRequest()->getParam('secret');
100
        $adminUser = $this->getAdminUser();
101
102
        $verificationPassed = $this->verifySecret($adminUser, $secret);
103
104
        if ($verificationPassed === false) {
105
            return $this->handleError();
106
        }
107
108
        return $this->handleSuccess();
109
    }
110
111
    private function verifySecret($adminUser, $postedSecret)
112
    {

Controller/Customerlogin/Verify.php 1 location

@@ 94-112 (lines=19) @@
91
     * @return \Magento\Framework\Controller\ResultInterface|ResponseInterface
92
     * @throws \Magento\Framework\Exception\NotFoundException
93
     */
94
    public function execute()
95
    {
96
        if ($this->shouldActionBeRun() === false) {
97
            return $this->getRedirectAction();
98
        }
99
100
        $secret   = $this->getRequest()->getParam('secret');
101
        $customer = $this->getCustomer();
102
        if ($customer === false) {
103
            return $this->handleError();
104
        }
105
        $verificationPassed = $this->verifySecret($customer, $secret);
106
107
        if ($verificationPassed === false) {
108
            return $this->handleError();
109
        }
110
111
        return $this->handleSuccess();
112
    }
113
114
    private function verifySecret(CustomerInterface $customer, $postedSecret)
115
    {