@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $time_parts = explode('.', $ttml_time); |
165 | 165 | $milliseconds = 0; |
166 | 166 | if (isset($time_parts[1])) { |
167 | - $milliseconds = (float) ('0.' . $time_parts[1]); |
|
167 | + $milliseconds = (float)('0.' . $time_parts[1]); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | list($hours, $minutes, $seconds) = array_map('intval', explode(':', $time_parts[0])); |
@@ -191,16 +191,16 @@ discard block |
||
191 | 191 | |
192 | 192 | protected static function internalTimeToTtml($internal_time) |
193 | 193 | { |
194 | - $formatted_output = round($internal_time, 3); |
|
194 | + $formatted_output = round($internal_time, 3); |
|
195 | 195 | |
196 | 196 | if (strpos($formatted_output, '.') === false) { |
197 | - $formatted_output .= ".0"; // Add at least one digit after decimal if there are no digits |
|
197 | + $formatted_output .= ".0"; // Add at least one digit after decimal if there are no digits |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | return $formatted_output; |
201 | 201 | } |
202 | 202 | |
203 | - protected static function framesPerSecond(string $file_content) : float|null |
|
203 | + protected static function framesPerSecond(string $file_content) : float | null |
|
204 | 204 | { |
205 | 205 | $frameRate = null; |
206 | 206 | preg_match('/ttp:frameRate="(\d+)"/', $file_content, $matches); |
@@ -280,8 +280,8 @@ discard block |
||
280 | 280 | foreach ($xml->text as $text) { |
281 | 281 | $attributes = $text->attributes(); |
282 | 282 | $internal_format[] = array( |
283 | - 'start' => (string) $attributes['start'], |
|
284 | - 'end' => (float)((string) $attributes['start'] + (string) $attributes['dur']), |
|
283 | + 'start' => (string)$attributes['start'], |
|
284 | + 'end' => (float)((string)$attributes['start'] + (string)$attributes['dur']), |
|
285 | 285 | 'lines' => self::getLinesFromTextWithBr(str_replace("\n", "<br>", $text->asXML())) |
286 | 286 | ); |
287 | 287 | } |