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

FakeGlobalStateProvider   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 27
ccs 4
cts 8
cp 0.5
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getServerSuperGlobal() 0 4 1
A getGetSuperGlobal() 0 4 1
A getPostSuperGlobal() 0 4 1
A getSessionSuperGlobal() 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\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
}