Code Duplication    Length = 13-14 lines in 2 locations

src/Observer/Controller/Admin/Postdispatch.php 1 location

@@ 117-130 (lines=14) @@
114
        return true;
115
    }
116
117
    private function areWeOnANonRedirectingPage()
118
    {
119
        $urls = $this->twoFactorUrls;
120
121
        if ($urls->areWeOnTheAuthenticationPage(true) === true) {
122
            return true;
123
        }
124
125
        if ($urls->areWeOnTheVerificationPage(true) === true) {
126
            return true;
127
        }
128
129
        return false;
130
    }
131
132
    private function redirectToAuthenticationPage(Action $controller)
133
    {

src/Observer/Controller/Frontend/Postdispatch.php 1 location

@@ 132-144 (lines=13) @@
129
        return true;
130
    }
131
132
    private function areWeOnAnAllowedPage()
133
    {
134
        $twoFactorUrls = $this->twoFactorUrls;
135
        if ($twoFactorUrls->areWeOnTheAuthenticationPage(false) === true) {
136
            return true;
137
        }
138
139
        if ($twoFactorUrls->areWeOnTheVerificationPage(false) === true) {
140
            return true;
141
        }
142
143
        return false;
144
    }
145
146
    private function hasTwoFactorBeenChecked()
147
    {