Provided arguments already have type declaration on the construtor and it is safe to use the same type on the class property Change-Id: Ia8bbdc4dee59dfb487582dd514486ec8542951be
26 lines
420 B
PHP
26 lines
420 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Settings\Source;
|
|
|
|
use Stringable;
|
|
|
|
/**
|
|
* Settings loaded from an array.
|
|
*
|
|
* @since 1.38
|
|
*/
|
|
class ArraySource implements Stringable, SettingsSource {
|
|
private array $settings;
|
|
|
|
public function __construct( array $settings ) {
|
|
$this->settings = $settings;
|
|
}
|
|
|
|
public function load(): array {
|
|
return $this->settings;
|
|
}
|
|
|
|
public function __toString(): string {
|
|
return '<array>';
|
|
}
|
|
}
|