Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
CRAP | |
0.00% |
0 / 1 |
ArraySource | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
3.33 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
load | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
__toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Settings\Source; |
4 | |
5 | /** |
6 | * Settings loaded from an array. |
7 | * |
8 | * @since 1.38 |
9 | */ |
10 | class ArraySource implements SettingsSource { |
11 | private $settings; |
12 | |
13 | public function __construct( array $settings ) { |
14 | $this->settings = $settings; |
15 | } |
16 | |
17 | public function load(): array { |
18 | return $this->settings; |
19 | } |
20 | |
21 | public function __toString(): string { |
22 | return '<array>'; |
23 | } |
24 | } |