Test Failed
Push — master ( a82e6c...0f2601 )
by Mantas
50s
created
src/Code/Converters/TtmlConverter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             $time_parts = explode('.', $ttml_time);
194 194
             $milliseconds = 0;
195 195
             if (isset($time_parts[1])) {
196
-                $milliseconds = (float) ('0.' . $time_parts[1]);
196
+                $milliseconds = (float)('0.' . $time_parts[1]);
197 197
             }
198 198
 
199 199
             list($hours, $minutes, $seconds) = array_map('intval', explode(':', $time_parts[0]));
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
 
223 223
     protected static function internalTimeToTtml($internal_time)
224 224
     {
225
-        $formatted_output =  round($internal_time, 3);
225
+        $formatted_output = round($internal_time, 3);
226 226
 
227 227
         if (strpos($formatted_output, '.') === false) {
228
-            $formatted_output .= ".0";  // Add at least one digit after decimal if there are no digits
228
+            $formatted_output .= ".0"; // Add at least one digit after decimal if there are no digits
229 229
         }
230 230
 
231 231
         return $formatted_output;
@@ -315,8 +315,8 @@  discard block
 block discarded – undo
315 315
         foreach ($xml->text as $text) {
316 316
             $attributes = $text->attributes();
317 317
             $internal_format[] = array(
318
-                'start' => (string) $attributes['start'],
319
-                'end' => (float)((string) $attributes['start'] + (string) $attributes['dur']),
318
+                'start' => (string)$attributes['start'],
319
+                'end' => (float)((string)$attributes['start'] + (string)$attributes['dur']),
320 320
                 'lines' => self::getLinesFromTextWithBr(str_replace("\n", "<br>", $text->asXML()))
321 321
             );
322 322
         }
Please login to merge, or discard this patch.
src/Code/Converters/TxtConverter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
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']],
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         }
231 231
 
232 232
         // sort times
233
-        usort($internal_format, function ($a, $b) {
233
+        usort($internal_format, function($a, $b) {
234 234
             if ($a['start'] === $b['start']) {
235 235
                 return $a['end'] <=> $b['end'];
236 236
             }
@@ -320,16 +320,16 @@  discard block
 block discarded – undo
320 320
         $total_parts = count($time_parts);
321 321
 
322 322
         if ($total_parts === 1) {
323
-            $tmp = (float) str_replace(',', '.', $time_parts[0]);
323
+            $tmp = (float)str_replace(',', '.', $time_parts[0]);
324 324
             return $tmp;
325 325
         } elseif ($total_parts === 2) { // minutes:seconds format
326 326
             list($minutes, $seconds) = array_map('intval', $time_parts);
327
-            $tmp = (float) str_replace(',', '.', $time_parts[1]);
327
+            $tmp = (float)str_replace(',', '.', $time_parts[1]);
328 328
             $milliseconds = $tmp - floor($tmp);
329 329
             return ($minutes * 60) + $seconds + $milliseconds;
330 330
         } elseif ($total_parts === 3) { // hours:minutes:seconds,milliseconds format
331 331
             list($hours, $minutes, $seconds) = array_map('intval', $time_parts);
332
-            $tmp = (float) str_replace(',', '.', $time_parts[2]);
332
+            $tmp = (float)str_replace(',', '.', $time_parts[2]);
333 333
             $milliseconds = $tmp - floor($tmp);
334 334
             return ($hours * 3600) + ($minutes * 60) + $seconds + $milliseconds;
335 335
         } elseif ($total_parts === 4) { // hours:minutes:seconds:frames format
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
             return $subject;
367 367
         }
368 368
 
369
-        $result = strstr($subject, (string) $search, true);
369
+        $result = strstr($subject, (string)$search, true);
370 370
 
371 371
         return $result === false ? $subject : $result;
372 372
     }
Please login to merge, or discard this patch.