Failed Conditions
Pull Request — newinternal (#552)
by Simon
19:39 queued 09:34
created

GlobalStateProvider   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
eloc 11
dl 0
loc 40
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getServerSuperGlobal() 0 3 1
A getGetSuperGlobal() 0 3 1
A getSessionSuperGlobal() 0 3 1
A getPostSuperGlobal() 0 3 1
A getCookieSuperGlobal() 0 3 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\Providers\GlobalState;
10
11
/**
12
 * Class GlobalStateProvider
13
 *
14
 * DO NOT USE THIS CLASS.
15
 * (Unless your name is <something>Test or WebRequest).
16
 *
17
 * @package Waca\Providers
18
 */
19
class GlobalStateProvider implements IGlobalStateProvider
20
{
21
    /**
22
     * @return array
23
     */
24
    public function &getServerSuperGlobal()
25
    {
26
        return $_SERVER;
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function &getGetSuperGlobal()
33
    {
34
        return $_GET;
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function &getPostSuperGlobal()
41
    {
42
        return $_POST;
43
    }
44
45
    /**
46
     * @return array
47
     */
48
    public function &getSessionSuperGlobal()
49
    {
50
        return $_SESSION;
51
    }
52
53
    /**
54
     * @return array
55
     */
56
    public function &getCookieSuperGlobal()
57
    {
58
        return $_COOKIE;
59
    }
60
}