Conditions | 5 |
Paths | 8 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public static function ABtest($testCounts, $targetCounts) |
||
27 | { |
||
28 | $ntotal = 0; |
||
29 | $resp = []; |
||
30 | foreach($testCounts as $testCount) { |
||
31 | $ntotal += $testCount[1]; |
||
32 | } |
||
33 | foreach($testCounts as $testCount) { |
||
34 | foreach ($targetCounts as $targetCount) { |
||
35 | if ($testCount[0] === $targetCount[1]) { |
||
36 | $resp[] = [$testCount[0], $testCount[1], $testCount[1]/$ntotal, $targetCount[2], $targetCount[2]/$testCount[1],$targetCount[2]/$ntotal]; |
||
37 | } |
||
38 | } |
||
39 | |||
40 | } |
||
41 | return $resp; |
||
42 | } |
||
45 |