Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 1.5786 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | public function getSubscribedEvents() |
||
21 | { |
||
22 | return [ |
||
23 | 'phpab.participation.variant_run' => function ($options) { |
||
24 | |||
25 | /** @var TestInterface $test */ |
||
26 | $test = $options[1]->getTest(); |
||
27 | |||
28 | /** @var VariantInterface $chosenVariant */ |
||
29 | $chosenVariant = $options[2]; |
||
30 | |||
31 | // Call the add method |
||
32 | $this->addParticipation($test->getIdentifier(), $chosenVariant->getIdentifier()); |
||
33 | } |
||
34 | 1 | ]; |
|
35 | } |
||
36 | |||
61 |