Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | 2 | public function getScript() |
|
41 | { |
||
42 | 2 | if (empty($this->participations)) { |
|
43 | 1 | return ''; |
|
44 | } |
||
45 | |||
46 | 1 | $script = []; |
|
47 | |||
48 | 1 | $script[] = '<script>'; |
|
49 | |||
50 | 1 | foreach ($this->participations as $testIdentifier => $variationIndex) { |
|
51 | 1 | $script[] = "cxApi.setChosenVariation(" . (int) $variationIndex . ", '" . (string) $testIdentifier . "')"; |
|
52 | 1 | } |
|
53 | |||
54 | 1 | $script[] = '</script>'; |
|
55 | |||
56 | 1 | return implode("\n", $script); |
|
57 | } |
||
58 | |||
68 |