Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
ConfigMaxLagFactory
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getMaxLag
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Extension\WikibaseManifest;
4
5use Config;
6
7class ConfigMaxLagFactory implements MaxLagFactory {
8
9    /**
10     * @var Config
11     */
12    private $config;
13
14    /**
15     * @var string
16     */
17    private $configValueName;
18
19    public function __construct( Config $config, string $configValueName ) {
20        $this->config = $config;
21        $this->configValueName = $configValueName;
22    }
23
24    public function getMaxLag(): MaxLag {
25        return new MaxLag( $this->config->get( $this->configValueName ) );
26    }
27
28}