| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 22 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 3.1406 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 16 | 1 | public function getProgress(string $line): ?array  | 
            |
| 17 |     { | 
            ||
| 18 | 1 |         $line = str_replace(' ', '', $line); | 
            |
| 19 | |||
| 20 | 1 |         $result = preg_match('/frame=(?P<frame>\d+)(.*)size=(?P<size>\d+(KB|MB|B))(.*)time=(?P<time>([0-9\.:]+))(.*)speed=(?P<speed>([0-9\.]+))x/i', $line, $matches); | 
            |
| 21 | |||
| 22 | 1 |         if ($result === 1) { | 
            |
| 23 |             try { | 
            ||
| 24 | 1 | $time = SeekTime::convertHMSmToSeconds($matches['time']);  | 
            |
| 25 |             } catch (InvalidArgumentException $e) { | 
            ||
| 26 | $time = 0;  | 
            ||
| 27 | }  | 
            ||
| 28 | |||
| 29 | return [  | 
            ||
| 30 | 1 | 'frame' => (int) $matches['frame'],  | 
            |
| 31 | 1 | 'size' => $matches['size'],  | 
            |
| 32 | 1 | 'time' => $time,  | 
            |
| 33 | 1 | 'speed' => (float) $matches['speed'],  | 
            |
| 34 | ];  | 
            ||
| 35 | }  | 
            ||
| 36 | |||
| 37 | return null;  | 
            ||
| 38 | }  | 
            ||
| 40 |