@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * Loads the class file for a given class name. |
110 | 110 | * |
111 | 111 | * @param string $class The fully-qualified class name. |
112 | - * @return mixed The mapped file name on success, or boolean false on |
|
112 | + * @return string|false The mapped file name on success, or boolean false on |
|
113 | 113 | * failure. |
114 | 114 | */ |
115 | 115 | public function loadClass($class) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * |
148 | 148 | * @param string $prefix The namespace prefix. |
149 | 149 | * @param string $relative_class The relative class name. |
150 | - * @return mixed Boolean false if no mapped file can be loaded, or the |
|
150 | + * @return false|string Boolean false if no mapped file can be loaded, or the |
|
151 | 151 | * name of the mapped file that was loaded. |
152 | 152 | */ |
153 | 153 | protected function loadMappedFile($prefix, $relative_class) |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @param string $name the desired attributes name |
224 | 224 | * @param mixed $default [optional] a default value in case the attribute isn't set, defaults to false |
225 | 225 | * |
226 | - * @return mixed the attribute's value in case it exists, otherwise $default |
|
226 | + * @return string the attribute's value in case it exists, otherwise $default |
|
227 | 227 | */ |
228 | 228 | public function getAttribute($name, $default = false){ |
229 | 229 | return isset($this->attributes[$name]) && !empty($this->attributes[$name]) ? $this->attributes[$name] : $default; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | |
250 | 250 | * @param string $name the desired attributes name |
251 | 251 | * @param array $whitelist an array with whitelisted key -> value pairs |
252 | - * @param mixed $default [optional] a default value in case the attribute isn't set, defaults to false |
|
252 | + * @param string $default [optional] a default value in case the attribute isn't set, defaults to false |
|
253 | 253 | * |
254 | 254 | * @return mixed boolean if no $default is set, otherwise the whitelist value to the given key in case it exists or $default |
255 | 255 | */ |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | * Checks if the current tag is whitelisted |
264 | 264 | * |
265 | 265 | * @param array $whitelist an array with whitelisted tag names |
266 | - * @param mixed $default [optional] a default value in case the tag isn't whitelisted |
|
266 | + * @param string $default [optional] a default value in case the tag isn't whitelisted |
|
267 | 267 | * |
268 | 268 | * @return mixed boolean if no $default is set, otherwise the whitelisted tag or $default |
269 | 269 | */ |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * shorthand for self::attributeIn('__BBTAG__', $array) |
315 | 315 | * |
316 | 316 | * @param array $array |
317 | - * @param mixed $default |
|
317 | + * @param string $default |
|
318 | 318 | * |
319 | 319 | * @return mixed |
320 | 320 | */ |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * |
328 | 328 | * @param string $url the URL to check |
329 | 329 | * |
330 | - * @return bool|string the url if valid, otherwise false |
|
330 | + * @return false|string the url if valid, otherwise false |
|
331 | 331 | */ |
332 | 332 | public function checkUrl($url){ |
333 | 333 | if(filter_var($url, FILTER_VALIDATE_URL) === false){ |
@@ -246,7 +246,6 @@ |
||
246 | 246 | |
247 | 247 | /** |
248 | 248 | * Checks if an attribute exists and if it exists as key in a whitelist |
249 | - |
|
250 | 249 | * @param string $name the desired attributes name |
251 | 250 | * @param array $whitelist an array with whitelisted key -> value pairs |
252 | 251 | * @param mixed $default [optional] a default value in case the attribute isn't set, defaults to false |
@@ -259,7 +259,7 @@ |
||
259 | 259 | /** |
260 | 260 | * strng regexp bbcode killer |
261 | 261 | * |
262 | - * @param string|array $bbcode BBCode as string or matches as array - callback from preg_replace_callback() |
|
262 | + * @param string $bbcode BBCode as string or matches as array - callback from preg_replace_callback() |
|
263 | 263 | * |
264 | 264 | * @return string |
265 | 265 | * @throws \chillerlan\bbcode\BBCodeException |
@@ -33,12 +33,12 @@ |
||
33 | 33 | |
34 | 34 | $search = [ |
35 | 35 | "\t", // lets convert all tabs into 4 spaces |
36 | - '{__BASE_URL__}', // assume we use a special token for our base url |
|
36 | + '{__BASE_URL__}', // assume we use a special token for our base url |
|
37 | 37 | ]; |
38 | 38 | |
39 | 39 | $replace = [ |
40 | 40 | ' ', |
41 | - 'https://your.base/url/' |
|
41 | + 'https://your.base/url/' |
|
42 | 42 | ]; |
43 | 43 | |
44 | 44 | return str_replace($search, $replace, $bbcode); |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @filesource example.php |
|
4 | - * @created 19.09.2015 |
|
5 | - * @author Smiley <[email protected]> |
|
6 | - * @copyright 2015 Smiley |
|
7 | - * @license MIT |
|
8 | - */ |
|
3 | + * @filesource example.php |
|
4 | + * @created 19.09.2015 |
|
5 | + * @author Smiley <[email protected]> |
|
6 | + * @copyright 2015 Smiley |
|
7 | + * @license MIT |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | require_once '../vendor/autoload.php'; |
11 | 11 |
@@ -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>'; |