Test Setup Failed
Pull Request — master (#52)
by Alexandre
56s
created
todo/converters/StlConverter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -113,11 +113,11 @@
 block discarded – undo
113 113
             throw new Exception('conversion function doesnt support more than 1 day, edit the code');
114 114
         }
115 115
 
116
-        $milliseconds = $seconds - (int) $seconds;
116
+        $milliseconds = $seconds - (int)$seconds;
117 117
         $framesUnpadded = floor(25 * $milliseconds); // 25 frames
118
-        $frames = str_pad((string) $framesUnpadded, 2, '0', STR_PAD_LEFT);
118
+        $frames = str_pad((string)$framesUnpadded, 2, '0', STR_PAD_LEFT);
119 119
 
120
-        return gmdate("H:i:s:$frames", (int) $seconds);
120
+        return gmdate("H:i:s:$frames", (int)$seconds);
121 121
     }
122 122
 
123 123
     protected static function toStlLines(array $lines): string
Please login to merge, or discard this patch.
todo/converters/SbvConverter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $parts = explode('.', $srtTime);
57 57
 
58 58
         $onlySeconds = strtotime("1970-01-01 {$parts[0]} UTC");
59
-        $milliseconds = (float) '0.' . $parts[1];
59
+        $milliseconds = (float)'0.' . $parts[1];
60 60
 
61 61
         return $onlySeconds + $milliseconds;
62 62
     }
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
         $whole = $parts[0]; // 1
72 72
         $decimal = isset($parts[1]) ? substr($parts[1], 0, 3) : 0; // 23
73 73
 
74
-        return gmdate("0:i:s", (int) floor($whole)) . '.' . str_pad($decimal, 3, '0', STR_PAD_RIGHT);
74
+        return gmdate("0:i:s", (int)floor($whole)) . '.' . str_pad($decimal, 3, '0', STR_PAD_RIGHT);
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
todo/converters/AssConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,6 +78,6 @@
 block discarded – undo
78 78
         $whole = $parts[0]; // 1
79 79
         $decimal = isset($parts[1]) ? substr($parts[1], 0, 2) : 0;
80 80
 
81
-        return gmdate("G:i:s", (int) floor($whole)) . '.' . str_pad($decimal, 2, '0', STR_PAD_RIGHT);
81
+        return gmdate("G:i:s", (int)floor($whole)) . '.' . str_pad($decimal, 2, '0', STR_PAD_RIGHT);
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
todo/converters/SubConverter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $parts = explode('.', $subTime);
71 71
 
72 72
         $onlySeconds = strtotime("1970-01-01 {$parts[0]} UTC");
73
-        $milliseconds = (float) '0.' . $parts[1];
73
+        $milliseconds = (float)'0.' . $parts[1];
74 74
 
75 75
         return $onlySeconds + $milliseconds;
76 76
     }
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
         $seconds = floor($internalTime);
85 85
         $remainder = fmod($internalTime, 1);
86 86
         $remainderString = round($remainder, 2) * 100;
87
-        $remainderString = str_pad((string) $remainderString, 2, '0', STR_PAD_RIGHT);
87
+        $remainderString = str_pad((string)$remainderString, 2, '0', STR_PAD_RIGHT);
88 88
 
89
-        return gmdate("H:i:s", (int) $seconds) . '.' . $remainderString;
89
+        return gmdate("H:i:s", (int)$seconds) . '.' . $remainderString;
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
todo/converters/DfxpConverter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $whole = $parts[0]; // 1
72 72
         $decimal = isset($parts[1]) ? substr($parts[1], 0, 3) : 0; // 23
73 73
 
74
-        return gmdate("H:i:s", (int) floor($whole)) . ',' . str_pad($decimal, 3, '0', STR_PAD_RIGHT);
74
+        return gmdate("H:i:s", (int)floor($whole)) . ',' . str_pad($decimal, 3, '0', STR_PAD_RIGHT);
75 75
     }
76 76
 
77 77
     protected static function dfxpTimeToInternal(string $dfxpTime): float
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $parts = explode(',', $dfxpTime);
80 80
 
81 81
         $onlySeconds = strtotime("1970-01-01 {$parts[0]} UTC");
82
-        $milliseconds = (float) '0.' . $parts[1];
82
+        $milliseconds = (float)'0.' . $parts[1];
83 83
 
84 84
         return $onlySeconds + $milliseconds;
85 85
     }
Please login to merge, or discard this patch.
todo/converters/TxtConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 
78 78
         $frame = round($decimal / 100 * 24);
79 79
 
80
-        $srtTime = gmdate("H:i:s", (int) floor($whole)) . '.' . str_pad((string) $frame, 2, '0', STR_PAD_LEFT);
80
+        $srtTime = gmdate("H:i:s", (int)floor($whole)) . '.' . str_pad((string)$frame, 2, '0', STR_PAD_LEFT);
81 81
 
82 82
         return "[$srtTime]";
83 83
     }
Please login to merge, or discard this patch.
src/Converters/VttConverter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
     protected static function fixLine(): Closure
87 87
     {
88
-        return function ($line) {
88
+        return function($line) {
89 89
             if (substr($line, 0, 3) === '<v ') {
90 90
                 $line = substr($line, 3);
91 91
                 $line = str_replace('>', ' ', $line);
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
             throw new InvalidTimeFormatException($subtitleFormat);
105 105
         }
106 106
 
107
-        return (int) $matches['hours'] * ConstantsInterface::HOURS_SECONDS
108
-            + (int) $matches['minutes'] * ConstantsInterface::MINUTES_SECONDS
109
-            + (int) $matches['seconds']
110
-            + (float) $matches['fraction'] / 1000;
107
+        return (int)$matches['hours'] * ConstantsInterface::HOURS_SECONDS
108
+            + (int)$matches['minutes'] * ConstantsInterface::MINUTES_SECONDS
109
+            + (int)$matches['seconds']
110
+            + (float)$matches['fraction'] / 1000;
111 111
     }
112 112
 
113 113
     /**
Please login to merge, or discard this patch.
src/Converters/SbvConverter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,10 +71,10 @@
 block discarded – undo
71 71
             throw new InvalidTimeFormatException($subtitleFormat);
72 72
         }
73 73
 
74
-        return (int) $matches['hours'] * ConstantsInterface::HOURS_SECONDS
75
-            + (int) $matches['minutes'] * ConstantsInterface::MINUTES_SECONDS
76
-            + (int) $matches['seconds']
77
-            + (float) $matches['fraction'] / 1000;
74
+        return (int)$matches['hours'] * ConstantsInterface::HOURS_SECONDS
75
+            + (int)$matches['minutes'] * ConstantsInterface::MINUTES_SECONDS
76
+            + (int)$matches['seconds']
77
+            + (float)$matches['fraction'] / 1000;
78 78
     }
79 79
 
80 80
     /**
Please login to merge, or discard this patch.
src/Converters/SrtConverter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@
 block discarded – undo
73 73
 
74 74
         $abc = 123;
75 75
 
76
-        return (int) $matches['hours'] * ConstantsInterface::HOURS_SECONDS
77
-            + (int) $matches['minutes'] * ConstantsInterface::MINUTES_SECONDS
78
-            + (int) $matches['seconds']
79
-            + (float) $matches['fraction'] / 1000;
76
+        return (int)$matches['hours'] * ConstantsInterface::HOURS_SECONDS
77
+            + (int)$matches['minutes'] * ConstantsInterface::MINUTES_SECONDS
78
+            + (int)$matches['seconds']
79
+            + (float)$matches['fraction'] / 1000;
80 80
     }
81 81
 
82 82
     public function toSubtitleTimeFormat(float $internalFormat): string
Please login to merge, or discard this patch.