Code Duplication    Length = 13-14 lines in 2 locations

Observer/Controller/Admin/Postdispatch.php 1 location

@@ 142-155 (lines=14) @@
139
        return true;
140
    }
141
142
    private function areWeOnANonRedirectingPage()
143
    {
144
        $urls = $this->checker;
145
146
        if ($urls->areWeOnTheAuthenticationPage(true) === true) {
147
            return true;
148
        }
149
150
        if ($urls->areWeOnTheVerificationPage(true) === true) {
151
            return true;
152
        }
153
154
        return false;
155
    }
156
157
    private function redirectToAuthenticationPage($response)
158
    {

Observer/Controller/Frontend/Postdispatch.php 1 location

@@ 185-197 (lines=13) @@
182
     *
183
     * @return bool
184
     */
185
    private function areWeOnAnAllowedPage()
186
    {
187
        $twoFactorUrls = $this->checker;
188
        if ($twoFactorUrls->areWeOnTheAuthenticationPage(false) === true) {
189
            return true;
190
        }
191
192
        if ($twoFactorUrls->areWeOnTheVerificationPage(false) === true) {
193
            return true;
194
        }
195
196
        return false;
197
    }
198
199
    /**
200
     * Checks the session to see if the verification flag has been set. Can be refactored