Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
LazyLoadedVariable
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
3
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
 getMethod
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getParameters
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Extension\AbuseFilter\Variables;
4
5class LazyLoadedVariable {
6    /**
7     * @var string The method used to compute the variable
8     */
9    private $method;
10    /**
11     * @var array Parameters to be used with the specified method
12     */
13    private $parameters;
14
15    /**
16     * @param string $method
17     * @param array $parameters
18     */
19    public function __construct( string $method, array $parameters ) {
20        $this->method = $method;
21        $this->parameters = $parameters;
22    }
23
24    /**
25     * @return string
26     */
27    public function getMethod(): string {
28        return $this->method;
29    }
30
31    /**
32     * @return array
33     */
34    public function getParameters(): array {
35        return $this->parameters;
36    }
37}