Passed
Push — master ( 833344...76588f )
by Amin
05:41
created
src/HLSSubtitle.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $this->language_name = $language_name;
66 66
         $this->language_code = $language_code;
67 67
 
68
-        if(!in_array(pathinfo($path, PATHINFO_EXTENSION), static::SUPPORTED_EXTS)){
68
+        if (!in_array(pathinfo($path, PATHINFO_EXTENSION), static::SUPPORTED_EXTS)) {
69 69
             throw new InvalidArgumentException(sprintf("Unsupported input! Only %s files are acceptable.", implode(",", static::SUPPORTED_EXTS)));
70 70
         }
71 71
     }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
             "AUTOSELECT"    => Utiles::convertBooleanToYesNo($this->isAutoSelect()),
246 246
             "FORCED"        => Utiles::convertBooleanToYesNo($this->isForce()),
247 247
             "LANGUAGE"      => "\"" . $this->language_code . "\"",
248
-            "URI"           => "\"" . $this->getM3u8Uri(). "\"",
248
+            "URI"           => "\"" . $this->getM3u8Uri() . "\"",
249 249
         ];
250 250
         Utiles::concatKeyValue($ext, "=");
251 251
 
@@ -265,11 +265,11 @@  discard block
 block discarded – undo
265 265
         Utiles::concatKeyValue($ext_x, ":");
266 266
         File::put($path, implode(PHP_EOL, array_merge([static::S_TAG], $ext_x, [$this->getUri(), static::E_TAG])));
267 267
 
268
-        if(!$this->m3u8_uri){
268
+        if (!$this->m3u8_uri) {
269 269
             $this->setM3u8Uri(pathinfo($path, PATHINFO_BASENAME));
270 270
         }
271 271
 
272
-        if(!$this->uri){
272
+        if (!$this->uri) {
273 273
             File::copy($this->path, implode(DIRECTORY_SEPARATOR, [dirname($path), $this->getBaseName()]));
274 274
         }
275 275
     }
Please login to merge, or discard this patch.
src/HLS.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
         $path = $this->getFilePath();
297 297
         $reps = $this->getRepresentations();
298 298
 
299
-        if(!empty($this->subtitles)){
299
+        if (!empty($this->subtitles)) {
300 300
             $this->generateSubs($path);
301 301
         }
302 302
 
@@ -322,14 +322,14 @@  discard block
 block discarded – undo
322 322
         $this->stream_des = array_merge($this->stream_des, [PHP_EOL]);
323 323
 
324 324
         foreach ($this->subtitles as $subtitle) {
325
-            if($subtitle instanceof HLSSubtitle){
325
+            if ($subtitle instanceof HLSSubtitle) {
326 326
                 $subtitle->generateM3U8File("{$path}_subtitles_{$subtitle->getLanguageCode()}.m3u8", $this->getDuration());
327 327
                 array_push($this->stream_des, (string)$subtitle);
328 328
             }
329 329
         }
330 330
         array_push($this->stream_des, PHP_EOL);
331 331
 
332
-        $this->getRepresentations()->map(function (Representation $rep){
332
+        $this->getRepresentations()->map(function(Representation $rep) {
333 333
             return $rep->setHlsStreamInfo(["SUBTITLES" => "\"" . $this->subtitles[0]->getGroupId() . "\""]);
334 334
         });
335 335
     }
Please login to merge, or discard this patch.