1 | <?php |
||
20 | abstract class AbstractMetricCollection extends AbstractMetric |
||
21 | { |
||
22 | /** |
||
23 | * @var MetricInterface[] |
||
24 | */ |
||
25 | protected $metrics = []; |
||
26 | |||
27 | /** |
||
28 | * @inheritdoc |
||
29 | */ |
||
30 | public function init() |
||
35 | |||
36 | /** |
||
37 | * @return float |
||
38 | */ |
||
39 | protected function calculateScore(): float |
||
51 | |||
52 | /** |
||
53 | * @inheritdoc |
||
54 | */ |
||
55 | public function toConfig(): array |
||
70 | |||
71 | /** |
||
72 | * @param array $metrics |
||
73 | * @return $this |
||
74 | */ |
||
75 | public function setMetrics(array $metrics = []) |
||
89 | |||
90 | /** |
||
91 | * @noinspection PhpDocMissingThrowsInspection |
||
92 | * |
||
93 | * @param $metric |
||
94 | * @return MetricInterface |
||
95 | */ |
||
96 | protected function createMetric($metric): MetricInterface |
||
102 | } |
||
103 |