Cancelled
Push — master ( e1e02b...1e7a78 )
by Mantas
02:19
created
src/code/Converters/VttConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 
72 72
     public static function fixLine()
73 73
     {
74
-        return function ($line) {
74
+        return function($line) {
75 75
             if (substr($line, 0, 3) == '<v ') {
76 76
                 $line = substr($line, 3);
77 77
                 $line = str_replace('>', ' ', $line);
Please login to merge, or discard this patch.
src/Subtitles.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             'end' => $end,
92 92
             'lines' => is_array($text) ? $text : [$text],
93 93
         ];
94
-        usort($this->internal_format, function ($item1, $item2) {
94
+        usort($this->internal_format, function($item1, $item2) {
95 95
             // return $item2['start'] <=> $item1['start']; // from  PHP 7
96 96
             if ($item2['start'] == $item1['start']) {
97 97
                 return 0;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
     public static function removeUtf8Bom($text)
225 225
     {
226
-        $bom = pack('H*','EFBBBF');
226
+        $bom = pack('H*', 'EFBBBF');
227 227
         $text = preg_replace("/^$bom/", '', $text);
228 228
 
229 229
         return $text;
Please login to merge, or discard this patch.
Doc Comments   +28 added lines patch added patch discarded remove patch
@@ -2,14 +2,35 @@  discard block
 block discarded – undo
2 2
 
3 3
 interface SubtitleContract {
4 4
 
5
+    /**
6
+     * @return void
7
+     */
5 8
     public static function convert($from_file_path, $to_file_path);
6 9
 
10
+    /**
11
+     * @return Subtitles
12
+     */
7 13
     public static function load($file_name, $extension = null); // load file
14
+
15
+    /**
16
+     * @return Subtitles
17
+     */
8 18
     public function save($file_name); // save file
9 19
     public function content($format); // output file content (instead of saving to file)
10 20
 
21
+    /**
22
+     * @return Subtitles
23
+     */
11 24
     public function add($start, $end, $text); // add one line // @TODO ability to add multilines
25
+
26
+    /**
27
+     * @return Subtitles
28
+     */
12 29
     public function remove($from, $till); // delete test from subtitles
30
+
31
+    /**
32
+     * @return Subtitles
33
+     */
13 34
     public function time($seconds); // shift time
14 35
 
15 36
 
@@ -32,6 +53,10 @@  discard block
 block discarded – undo
32 53
 
33 54
 
34 55
     // input
56
+
57
+    /**
58
+     * @return Subtitles
59
+     */
35 60
     public static function loadString($string, $extension);
36 61
 
37 62
     // chose format
@@ -182,6 +207,9 @@  discard block
 block discarded – undo
182 207
 //        ));
183 208
 //    }
184 209
 
210
+    /**
211
+     * @param string $format
212
+     */
185 213
     public function content($format)
186 214
     {
187 215
         $format = strtolower(trim($format, '.'));
Please login to merge, or discard this patch.