Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
AutoAssignedMentorsMetric | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
calculate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getStatsdKey | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace GrowthExperiments\PeriodicMetrics; |
4 | |
5 | use GrowthExperiments\Mentorship\Provider\MentorProvider; |
6 | |
7 | class AutoAssignedMentorsMetric implements IMetric { |
8 | |
9 | /** @var MentorProvider */ |
10 | private $mentorProvider; |
11 | |
12 | /** |
13 | * @param MentorProvider $mentorProvider |
14 | */ |
15 | public function __construct( |
16 | MentorProvider $mentorProvider |
17 | ) { |
18 | $this->mentorProvider = $mentorProvider; |
19 | } |
20 | |
21 | /** |
22 | * @inheritDoc |
23 | */ |
24 | public function calculate(): int { |
25 | return count( $this->mentorProvider->getAutoAssignedMentors() ); |
26 | } |
27 | |
28 | /** |
29 | * @inheritDoc |
30 | */ |
31 | public function getStatsdKey(): string { |
32 | return 'GrowthExperiments.Mentorship.AutoMentors'; |
33 | } |
34 | } |