Total Complexity | 4 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class ActionDialEnd { |
||
11 | |||
12 | public static function execute(WorkerCallEvents $worker, $data):void |
||
13 | { |
||
14 | $filter = self::getFilter($data); |
||
15 | /** @var CallDetailRecordsTmp $row */ |
||
16 | $m_data = CallDetailRecordsTmp::find($filter); |
||
17 | foreach ($m_data as $row) { |
||
18 | $row->writeAttribute('endtime', $data['endtime']); |
||
19 | $res = $row->update(); |
||
20 | if (!$res) { |
||
21 | Util::sysLogMsg(static::class, implode(' ', $row->getMessages()), LOG_DEBUG); |
||
22 | } |
||
23 | } |
||
24 | } |
||
25 | |||
26 | private static function getFilter($data):array |
||
33 | ], |
||
34 | ]; |
||
36 | } |