Test Setup Failed
Pull Request — master (#41)
by Theodore
01:17
created
src/code/Converters/VttConverter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
         $blocks = explode("\n\n", trim($file_content)); // each block contains: start and end times + text
10 10
 
11 11
         foreach ($blocks as $block) {
12
-            if(preg_match('/^WEBVTT.{0,}/', $block, $matches)) {
12
+            if (preg_match('/^WEBVTT.{0,}/', $block, $matches)) {
13 13
                 continue;
14 14
             }
15 15
             
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $parts = explode('.', $vtt_time);
59 59
         
60 60
         // parts[0] could be mm:ss or hh:mm:ss format -> always use hh:mm:ss
61
-        $parts[0] = substr_count($parts[0], ':') == 2 ? $parts[0] : '00:'.$parts[0];
61
+        $parts[0] = substr_count($parts[0], ':') == 2 ? $parts[0] : '00:' . $parts[0];
62 62
 
63 63
         $only_seconds = strtotime("1970-01-01 {$parts[0]} UTC");
64 64
         $milliseconds = (float)('0.' . $parts[1]);
Please login to merge, or discard this patch.