Code Duplication    Length = 12-18 lines in 2 locations

src/Security/Security.php 2 locations

@@ 654-671 (lines=18) @@
651
     *
652
     * @return string|HTTPResponse Returns the "login" page as HTML code.
653
     */
654
    public function login($request)
655
    {
656
        // Check pre-login process
657
        if ($response = $this->preLogin()) {
658
            return $response;
659
        }
660
661
        // Create the login handler
662
        $handler = $this->getAuthenticator()->getLoginHandler(
663
            Controller::join_links($this->link(), 'login')
664
        );
665
666
        return $this->delegateToHandler(
667
            $handler,
668
            _t('Security.LOGIN', 'Log in'),
669
            $this->getTemplatesFor('login')
670
        );
671
    }
672
673
    /**
674
     * Delegate to another RequestHandler, rendering any fragment arrays into an appropriate.
@@ 748-759 (lines=12) @@
745
     *
746
     * @return string Returns the "lost password" page as HTML code.
747
     */
748
    public function lostpassword()
749
    {
750
        $handler = $this->getAuthenticator()->getLostPasswordHandler(
751
            Controller::join_links($this->link(), 'lostpassword')
752
        );
753
754
        return $this->delegateToHandler(
755
            $handler,
756
            _t('Security.LOSTPASSWORDHEADER', 'Lost Password'),
757
            $this->getTemplatesFor('lostpassword')
758
        );
759
    }
760
761
    /**
762
     * Create a link to the password reset form.