Failed Conditions
Branch newinternal (3df7fe)
by Simon
04:13
created

FakeGlobalStateProvider::getGetSuperGlobal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
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 TestStateProvider
13
 *
14
 * This class is only to be used for testing sets of the global state variables. For everything else, please use PHPUnit
15
 * mocks as normal.
16
 *
17
 * @package Waca\Tests\Utility
18
 */
19
class FakeGlobalStateProvider extends GlobalStateProvider implements IGlobalStateProvider
20
{
21
	var $server = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $server.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
22
	var $get = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $get.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
23
	var $post = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $post.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
24
	var $session = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $session.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
25
26 2
	public function &getServerSuperGlobal()
27
	{
28 2
		return $this->server;
29
	}
30
31
	public function &getGetSuperGlobal()
32
	{
33
		return $this->get;
34
	}
35
36
	public function &getPostSuperGlobal()
37
	{
38
		return $this->post;
39
	}
40
41 5
	public function &getSessionSuperGlobal()
42
	{
43 5
		return $this->session;
44
	}
45
}