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 resetScore() |
||
63 | |||
64 | /** |
||
65 | * @inheritdoc |
||
66 | */ |
||
67 | public function toConfig(): array |
||
82 | |||
83 | /** |
||
84 | * @param array $metrics |
||
85 | * @return $this |
||
86 | */ |
||
87 | public function setMetrics(array $metrics = []) |
||
101 | |||
102 | /** |
||
103 | * @noinspection PhpDocMissingThrowsInspection |
||
104 | * |
||
105 | * @param $metric |
||
106 | * @return MetricInterface |
||
107 | */ |
||
108 | protected function createMetric($metric): MetricInterface |
||
114 | } |
||
115 |