Completed
Push — master ( fe350e...be5f46 )
by smiley
04:14
created
src/ParserMiddlewareInterface.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Output/BBCodeModuleAbstract.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 			return $this->transform();
85 85
 		}
86 86
 
87
-		return  '';//$this->match;
87
+		return  ''; //$this->match;
88 88
 	}
89 89
 
90 90
 	/**
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\BBCode\Output;
14 14
 
15
-use chillerlan\Settings\SettingsContainerInterface;
16 15
 use Psr\Log\LoggerInterface;
17 16
 use Psr\SimpleCache\CacheInterface;
17
+use chillerlan\Settings\SettingsContainerInterface;
18 18
 
19 19
 abstract class BBCodeModuleAbstract implements BBCodeModuleInterface{
20 20
 
Please login to merge, or discard this patch.
src/Output/BBCodeModuleInterface.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\BBCode\Output;
14 14
 
15
-use chillerlan\Settings\SettingsContainerInterface;
16 15
 use Psr\Log\LoggerInterface;
17 16
 use Psr\SimpleCache\CacheInterface;
17
+use chillerlan\Settings\SettingsContainerInterface;
18 18
 
19 19
 interface BBCodeModuleInterface{
20 20
 
Please login to merge, or discard this patch.
src/Output/BBCodeOutputAbstract.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\BBCode\Output;
14 14
 
15
-use chillerlan\Settings\SettingsContainerInterface;
16 15
 use Psr\Log\LoggerInterface;
17 16
 use Psr\SimpleCache\CacheInterface;
17
+use chillerlan\Settings\SettingsContainerInterface;
18 18
 
19 19
 abstract class BBCodeOutputAbstract implements BBCodeOutputInterface{
20 20
 
Please login to merge, or discard this patch.
src/Output/BBCodeOutputInterface.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\BBCode\Output;
14 14
 
15
-use chillerlan\Settings\SettingsContainerInterface;
16 15
 use Psr\Log\LoggerInterface;
17 16
 use Psr\SimpleCache\CacheInterface;
17
+use chillerlan\Settings\SettingsContainerInterface;
18 18
 
19 19
 interface BBCodeOutputInterface{
20 20
 
Please login to merge, or discard this patch.
src/BBCode.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		}
142 142
 
143 143
 		if($this->options->sanitizeInput || $this->options->sanitizeOutput){
144
-			$this->sanitizerInterface  = new $this->options->sanitizerInterface($this->options);
144
+			$this->sanitizerInterface = new $this->options->sanitizerInterface($this->options);
145 145
 
146 146
 			if(!$this->sanitizerInterface instanceof SanitizerInterface){
147 147
 				throw new BBcodeException('invalid SanitizerInterface');
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 			return '';
254 254
 		}
255 255
 
256
-		if($callback_count < $this->limit && !in_array($tag, $this->noparse , true)){
256
+		if($callback_count < $this->limit && !in_array($tag, $this->noparse, true)){
257 257
 			$content = preg_replace_callback('#\[(\w+)((?:\s|=)[^]]*)?]((?:[^[]|\[(?!/?\1((?:\s|=)[^]]*)?])|(?R))*)\[/\1]#', __METHOD__, $content);
258 258
 			$e = preg_last_error();
259 259
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 			if($e !== PREG_NO_ERROR){
269 269
 				$this->logger->debug('preg_error', ['errno' => $e, '$content' => $content]);
270 270
 
271
-				$content = $match ?? '';//$content ?? $bbcode ??
271
+				$content = $match ?? ''; //$content ?? $bbcode ??
272 272
 			}
273 273
 		}
274 274
 
Please login to merge, or discard this patch.
src/Output/Markdown/StyledText.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
 
31 31
 		$str = [
32 32
 			'b'      => '**', // bold
33
-			'c'      => '`',  // inline code
33
+			'c'      => '`', // inline code
34 34
 			'del'    => '~~', // strikethrough
35
-			'em'     => '_',  // italic
36
-			'i'      => '_',  // italic
35
+			'em'     => '_', // italic
36
+			'i'      => '_', // italic
37 37
 			's'      => '~~', // strikethrough
38 38
 			'strong' => '**', // bold
39 39
 		][$this->tag];
Please login to merge, or discard this patch.
src/Output/Markdown/Basic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	 */
51 51
 	protected function url():string{ // @todo linktext
52 52
 
53
-		$url = filter_var($this->bbtag() ?? $this->content, FILTER_VALIDATE_URL);// @todo
53
+		$url = filter_var($this->bbtag() ?? $this->content, FILTER_VALIDATE_URL); // @todo
54 54
 
55 55
 		if($url){
56 56
 			return  '[url]('.$url.')';
Please login to merge, or discard this patch.
src/Output/HTML/Expanders.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		$id = $this->randomID();
32 32
 
33 33
 		return '<div class="'.$this->tag.'-container">'.
34
-		       '<div data-id="'.$id.'" class="'.$this->tag.'-header expander"><span>'.$this->tag.': '.$this->getAttribute('desc').'</span></div>'. // @todo: desc in tag attribute
34
+		       '<div data-id="'.$id.'" class="'.$this->tag.'-header expander"><span>'.$this->tag.': '.$this->getAttribute('desc').'</span></div>'.// @todo: desc in tag attribute
35 35
 		       '<div id="'.$id.'" class="'.$this->tag.'-body" style="display:none;">'.$this->content.'</div>'.
36 36
 		       '</div>';
37 37
 	}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		// @todo
52 52
 		return '<div class="quote-container">'.
53 53
 		       '<div data-id="'.$id.'" class="quote-header expander">quote '.($this->getAttribute('source', null) ?? '').(!empty($url) ? ' <small>[<a href="'.$url.'">link</a>]<small>' : '').'</div>'.
54
-		       '<blockquote id="'.$id.'" class="quote-body" style="display:block;">'.$this->content.'</blockquote>'. // @todo: collapse (js: collapse child elements etc.)
54
+		       '<blockquote id="'.$id.'" class="quote-body" style="display:block;">'.$this->content.'</blockquote>'.// @todo: collapse (js: collapse child elements etc.)
55 55
 		       '</div>';
56 56
 	}
57 57
 
Please login to merge, or discard this patch.