@@ -26,14 +26,14 @@ |
||
26 | 26 | public static function ABtest($testCounts, $targetCounts) |
27 | 27 | { |
28 | 28 | $ntotal = 0; |
29 | - $resp = []; |
|
30 | - foreach($testCounts as $testCount) { |
|
29 | + $resp = []; |
|
30 | + foreach ($testCounts as $testCount) { |
|
31 | 31 | $ntotal += $testCount[1]; |
32 | 32 | } |
33 | - foreach($testCounts as $testCount) { |
|
33 | + foreach ($testCounts as $testCount) { |
|
34 | 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]; |
|
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 | 37 | } |
38 | 38 | } |
39 | 39 |