@@ -208,7 +208,7 @@ |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | /** |
| 211 | - * @param $bbcode |
|
| 211 | + * @param string $bbcode |
|
| 212 | 212 | * |
| 213 | 213 | * @return string |
| 214 | 214 | */ |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | if($this->options->sanitizeInput || $this->options->sanitizeOutput){ |
| 141 | - $this->sanitizerInterface = $this->loadClass($this->options->sanitizerInterface, SanitizerInterface::class, $this->options); |
|
| 141 | + $this->sanitizerInterface = $this->loadClass($this->options->sanitizerInterface, SanitizerInterface::class, $this->options); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | return ''; |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | - if($callback_count < (int)$this->options->nestingLimit && !in_array($tag, $this->noparse , true)){ |
|
| 239 | + if($callback_count < (int)$this->options->nestingLimit && !in_array($tag, $this->noparse, true)){ |
|
| 240 | 240 | $content = preg_replace_callback('#\[(\w+)((?:\s|=)[^]]*)?]((?:[^[]|\[(?!/?\1((?:\s|=)[^]]*)?])|(?R))*)\[/\1]#', __METHOD__, $content); |
| 241 | 241 | $e = preg_last_error(); |
| 242 | 242 | |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | if($e !== PREG_NO_ERROR){ |
| 252 | 252 | $this->logger->debug('preg_error', ['errno' => $e, '$content' => $content]); |
| 253 | 253 | |
| 254 | - $content = $match ?? '';//$content ?? $bbcode ?? |
|
| 254 | + $content = $match ?? ''; //$content ?? $bbcode ?? |
|
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | namespace chillerlan\BBCode\Output; |
| 14 | 14 | |
| 15 | -use chillerlan\Traits\ContainerInterface; |
|
| 16 | 15 | use Psr\Log\LoggerInterface; |
| 17 | 16 | use Psr\SimpleCache\CacheInterface; |
| 17 | +use chillerlan\Traits\ContainerInterface; |
|
| 18 | 18 | |
| 19 | 19 | abstract class BBCodeModuleAbstract implements BBCodeModuleInterface{ |
| 20 | 20 | |
@@ -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 |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | return $this->transform(); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - return '';//$this->match; |
|
| 87 | + return ''; //$this->match; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -24,6 +24,7 @@ |
||
| 24 | 24 | * @param \chillerlan\Traits\ContainerInterface $options |
| 25 | 25 | * @param \Psr\SimpleCache\CacheInterface $cache |
| 26 | 26 | * @param \Psr\Log\LoggerInterface $logger |
| 27 | + * @return void |
|
| 27 | 28 | */ |
| 28 | 29 | public function __construct(ContainerInterface $options, CacheInterface $cache, LoggerInterface $logger); |
| 29 | 30 | |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | namespace chillerlan\BBCode\Output; |
| 14 | 14 | |
| 15 | -use chillerlan\Traits\ContainerInterface; |
|
| 16 | 15 | use Psr\Log\LoggerInterface; |
| 17 | 16 | use Psr\SimpleCache\CacheInterface; |
| 17 | +use chillerlan\Traits\ContainerInterface; |
|
| 18 | 18 | |
| 19 | 19 | interface BBCodeModuleInterface{ |
| 20 | 20 | |
@@ -24,6 +24,7 @@ |
||
| 24 | 24 | * @param \chillerlan\Traits\ContainerInterface $options |
| 25 | 25 | * @param \Psr\SimpleCache\CacheInterface $cache |
| 26 | 26 | * @param \Psr\Log\LoggerInterface $logger |
| 27 | + * @return void |
|
| 27 | 28 | */ |
| 28 | 29 | public function __construct(ContainerInterface $options, CacheInterface $cache, LoggerInterface $logger); |
| 29 | 30 | |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | namespace chillerlan\BBCode\Output; |
| 14 | 14 | |
| 15 | -use chillerlan\Traits\ContainerInterface; |
|
| 16 | 15 | use Psr\Log\LoggerInterface; |
| 17 | 16 | use Psr\SimpleCache\CacheInterface; |
| 17 | +use chillerlan\Traits\ContainerInterface; |
|
| 18 | 18 | |
| 19 | 19 | interface BBCodeOutputInterface{ |
| 20 | 20 | |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | namespace chillerlan\BBCode; |
| 14 | 14 | |
| 15 | -use chillerlan\Traits\ContainerInterface; |
|
| 16 | 15 | use Psr\Log\LoggerInterface; |
| 17 | 16 | use Psr\SimpleCache\CacheInterface; |
| 17 | +use chillerlan\Traits\ContainerInterface; |
|
| 18 | 18 | |
| 19 | 19 | interface ParserMiddlewareInterface{ |
| 20 | 20 | |