@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | - $internal_format[$j] = [ |
|
112 | + $internal_format[$j] = [ |
|
113 | 113 | 'start' => $row['start'], |
114 | 114 | 'end' => $row['end'], |
115 | 115 | 'lines' => [$row['text']], |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | // sort times |
204 | - usort($internal_format, function ($a, $b) { |
|
204 | + usort($internal_format, function($a, $b) { |
|
205 | 205 | if ($a['start'] === $b['start']) { |
206 | 206 | return $a['end'] > $b['end']; |
207 | 207 | } |
@@ -288,23 +288,23 @@ discard block |
||
288 | 288 | return $matches; |
289 | 289 | } |
290 | 290 | |
291 | - public static function timeToInternal(string $time, int|null $fps) |
|
291 | + public static function timeToInternal(string $time, int | null $fps) |
|
292 | 292 | { |
293 | 293 | $time = trim($time); |
294 | 294 | $time_parts = explode(':', $time); |
295 | 295 | $total_parts = count($time_parts); |
296 | 296 | |
297 | 297 | if ($total_parts === 1) { |
298 | - $tmp = (float) str_replace(',', '.', $time_parts[0]); |
|
298 | + $tmp = (float)str_replace(',', '.', $time_parts[0]); |
|
299 | 299 | return $tmp; |
300 | 300 | } elseif ($total_parts === 2) { // minutes:seconds format |
301 | 301 | list($minutes, $seconds) = array_map('intval', $time_parts); |
302 | - $tmp = (float) str_replace(',', '.', $time_parts[1]); |
|
302 | + $tmp = (float)str_replace(',', '.', $time_parts[1]); |
|
303 | 303 | $milliseconds = $tmp - floor($tmp); |
304 | 304 | return ($minutes * 60) + $seconds + $milliseconds; |
305 | 305 | } elseif ($total_parts === 3) { // hours:minutes:seconds,milliseconds format |
306 | 306 | list($hours, $minutes, $seconds) = array_map('intval', $time_parts); |
307 | - $tmp = (float) str_replace(',', '.', $time_parts[2]); |
|
307 | + $tmp = (float)str_replace(',', '.', $time_parts[2]); |
|
308 | 308 | $milliseconds = $tmp - floor($tmp); |
309 | 309 | return ($hours * 3600) + ($minutes * 60) + $seconds + $milliseconds; |
310 | 310 | } elseif ($total_parts === 4) { // hours:minutes:seconds:frames format |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | return $subject; |
342 | 342 | } |
343 | 343 | |
344 | - $result = strstr($subject, (string) $search, true); |
|
344 | + $result = strstr($subject, (string)$search, true); |
|
345 | 345 | |
346 | 346 | return $result === false ? $subject : $result; |
347 | 347 | } |