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

PageLogout   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A main() 0 5 1
A isProtectedPage() 0 4 1
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