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

GlobalStateProvider::getCookieSuperGlobal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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
}