From 7db0141b0d86627e4bbe463ecb9a8b5f1abad598 Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 9 Aug 2024 06:52:41 +0000 Subject: [PATCH] * [task#124859,done,0.5h] Add generateUniqueKey function. --- .../test_concentration_in_execution_when_closing.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/module/metric/calc/execution/qc/test_concentration_in_execution_when_closing.php b/module/metric/calc/execution/qc/test_concentration_in_execution_when_closing.php index 8b2ed41afd..da9803833a 100755 --- a/module/metric/calc/execution/qc/test_concentration_in_execution_when_closing.php +++ b/module/metric/calc/execution/qc/test_concentration_in_execution_when_closing.php @@ -56,4 +56,16 @@ class test_concentration_in_execution_when_closing extends baseCalc foreach($this->result as $execution => $value) $records[] = array('execution' => $execution, 'value' => $value); return $this->filterByOptions($records, $options); } + + public function generateUniqueKey($records) + { + $uniqueKeyRecords = array(); + foreach($records as $record) + { + $key = $record['execution']; + $uniqueKeyRecords[$key] = $record['value']; + } + + return $uniqueKeyRecords; + } }