@@ -101,7 +101,6 @@ |
||
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Checks if an attribute exists and if it exists as key in a whitelist |
104 | - |
|
105 | 104 | * @param string $name the desired attributes name |
106 | 105 | * @param array $whitelist an array with whitelisted key -> value pairs |
107 | 106 | * @param mixed $default [optional] a default value in case the attribute isn't set, defaults to false |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Class Code |
|
4 | - * |
|
5 | - * @filesource Code.php |
|
6 | - * @created 12.10.2015 |
|
7 | - * @package chillerlan\bbcode\Modules\Html5 |
|
8 | - * @author Smiley <[email protected]> |
|
9 | - * @copyright 2015 Smiley |
|
10 | - * @license MIT |
|
11 | - */ |
|
3 | + * Class Code |
|
4 | + * |
|
5 | + * @filesource Code.php |
|
6 | + * @created 12.10.2015 |
|
7 | + * @package chillerlan\bbcode\Modules\Html5 |
|
8 | + * @author Smiley <[email protected]> |
|
9 | + * @copyright 2015 Smiley |
|
10 | + * @license MIT |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | namespace chillerlan\bbcode\Modules\Html5; |
14 | 14 |
@@ -72,10 +72,10 @@ |
||
72 | 72 | |
73 | 73 | if($this->flash){ |
74 | 74 | $player = '<object type="application/x-shockwave-flash" data="'.$video_url.'">' |
75 | - .'<param name="allowfullscreen" value="true">' |
|
76 | - .'<param name="wmode" value="opaque" />' |
|
77 | - .'<param name="movie" value="'.$video_url.'" />' |
|
78 | - .'</object>'; |
|
75 | + .'<param name="allowfullscreen" value="true">' |
|
76 | + .'<param name="wmode" value="opaque" />' |
|
77 | + .'<param name="movie" value="'.$video_url.'" />' |
|
78 | + .'</object>'; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | return '<div'.$cssclass.'>'.$player.'</div>'; |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | if($video_url === false){ |
66 | 66 | return '<video src="'.$this->content.'"'.$cssclass.' preload="auto" controls="true"></video>'; |
67 | - } |
|
68 | - else{ |
|
67 | + } else{ |
|
69 | 68 | |
70 | 69 | if(!empty($video_url)){ |
71 | 70 | $player = '<iframe src="'.$video_url.'" allowfullscreen></iframe>'; |
@@ -122,12 +121,10 @@ discard block |
||
122 | 121 | if($host === 'youtube.com'){ |
123 | 122 | parse_str($url['query'], $q); |
124 | 123 | $id = $q['v']; |
125 | - } |
|
126 | - else if($host === 'youtu.be'){ |
|
124 | + } else if($host === 'youtu.be'){ |
|
127 | 125 | $e = explode('/', $url['path'], 2); |
128 | 126 | $id = isset($e[1]) ? $e[1] : false; |
129 | - } |
|
130 | - else{ |
|
127 | + } else{ |
|
131 | 128 | $id = $this->content; |
132 | 129 | } |
133 | 130 | |
@@ -169,11 +166,9 @@ discard block |
||
169 | 166 | |
170 | 167 | if($host === 'dailymotion.com'){ |
171 | 168 | $id = explode('_', str_replace('/video/', '', $url['path']), 2)[0]; |
172 | - } |
|
173 | - else if($host === 'dai.ly'){ |
|
169 | + } else if($host === 'dai.ly'){ |
|
174 | 170 | $id = $url['path']; |
175 | - } |
|
176 | - else{ |
|
171 | + } else{ |
|
177 | 172 | $id = $this->content; |
178 | 173 | } |
179 | 174 |
@@ -184,8 +184,7 @@ discard block |
||
184 | 184 | $this->allowed_tags[] = $tag; |
185 | 185 | } |
186 | 186 | } |
187 | - } |
|
188 | - else{ |
|
187 | + } else{ |
|
189 | 188 | if($this->parserOptions->allow_all){ |
190 | 189 | $this->allowed_tags = array_keys($this->tagmap); |
191 | 190 | } |
@@ -276,13 +275,11 @@ discard block |
||
276 | 275 | |
277 | 276 | $callback = true; |
278 | 277 | $callback_count++; |
279 | - } |
|
280 | - else if(is_string($bbcode) && !empty($bbcode)){ |
|
278 | + } else if(is_string($bbcode) && !empty($bbcode)){ |
|
281 | 279 | $tag = null; |
282 | 280 | $attributes = []; |
283 | 281 | $content = $bbcode; |
284 | - } |
|
285 | - else{ |
|
282 | + } else{ |
|
286 | 283 | return ''; |
287 | 284 | } |
288 | 285 |
@@ -101,7 +101,6 @@ |
||
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Checks if an attribute exists and if it exists as key in a whitelist |
104 | - |
|
105 | 104 | * @param string $name the desired attributes name |
106 | 105 | * @param array $whitelist an array with whitelisted key -> value pairs |
107 | 106 | * @param mixed $default [optional] a default value in case the attribute isn't set, defaults to false |
@@ -24,8 +24,8 @@ |
||
24 | 24 | Chinese::class, |
25 | 25 | English::class, |
26 | 26 | French::class, |
27 | - German::class, |
|
28 | - Spanish::class, |
|
27 | + German::class, |
|
28 | + Spanish::class, |
|
29 | 29 | ]; |
30 | 30 | |
31 | 31 | public function testIterateLanguage(){ |