* Get job counts by types. * * @param array $types * @return array */
(array $types)
| 303 | * @return array<int> |
| 304 | */ |
| 305 | public function getCounts(array $types): array |
| 306 | { |
| 307 | $keys = $this->getKeys(['']); |
| 308 | $transformedTypes = array_map( |
| 309 | fn($type) => $type === 'waiting' ? 'wait' : $type, |
| 310 | $types |
| 311 | ); |
| 312 | |
| 313 | $result = $this->execScript('getCounts-1.lua', $keys, $transformedTypes); |
| 314 | |
| 315 | return is_array($result) ? $result : []; |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Get counts per priority. |
nothing calls this directly
no test coverage detected