Code Duplication    Length = 13-14 lines in 2 locations

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

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

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

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