Failed Conditions
Pull Request — newinternal (#527)
by Simon
16:02 queued 05:59
created

PageLogout::isProtectedPage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/******************************************************************************
3
 * Wikipedia Account Creation Assistance tool                                 *
4
 *                                                                            *
5
 * All code in this file is released into the public domain by the ACC        *
6
 * Development Team. Please see team.json for a list of contributors.         *
7
 ******************************************************************************/
8
9
namespace Waca\Pages\UserAuth;
10
11
use Waca\Session;
12
use Waca\Tasks\InternalPageBase;
13
14
class PageLogout extends InternalPageBase
15
{
16
    /**
17
     * Main function for this page, when no specific actions are called.
18
     */
19
    protected function main()
20
    {
21
        Session::destroy();
22
        $this->redirect("login");
23
    }
24
25
    protected function isProtectedPage()
26
    {
27
        return false;
28
    }
29
}
30