stwalkerster /
waca
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 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
|
|||
| 22 | var $get = array(); |
||
|
0 ignored issues
–
show
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
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
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 | } |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.