Completed
Push — master ( fe350e...be5f46 )
by smiley
04:14
created
src/Output/BBCodeModuleAbstract.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
 	/**
211 211
 	 * shorthand for self::attributeIn('__BBTAG__', $array)
212 212
 	 *
213
-	 * @param array $array
214
-	 * @param mixed $default
213
+	 * @param string[] $array
214
+	 * @param string $default
215 215
 	 *
216 216
 	 * @return mixed
217 217
 	 */
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
 	 * @param string $name      the desired attributes name
256 256
 	 * @param array  $whitelist an array with whitelisted key -> value pairs
257
-	 * @param mixed  $default   [optional] a default value in case the attribute isn't set, defaults to false
257
+	 * @param string  $default   [optional] a default value in case the attribute isn't set, defaults to false
258 258
 	 *
259 259
 	 * @return mixed boolean if no $default is set, otherwise the whitelist value to the given key in case it exists or $default
260 260
 	 */
@@ -267,8 +267,8 @@  discard block
 block discarded – undo
267 267
 	/**
268 268
 	 * Checks if the current tag is whitelisted
269 269
 	 *
270
-	 * @param array $whitelist an array with whitelisted tag names
271
-	 * @param mixed $default   [optional] a default value in case the tag isn't whitelisted
270
+	 * @param string[] $whitelist an array with whitelisted tag names
271
+	 * @param string $default   [optional] a default value in case the tag isn't whitelisted
272 272
 	 *
273 273
 	 * @return mixed boolean if no $default is set, otherwise the whitelisted tag or $default
274 274
 	 */
Please login to merge, or discard this patch.
src/Output/BBCodeModuleInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -24,6 +24,7 @@
 block discarded – undo
24 24
 	 * @param \chillerlan\Settings\SettingsContainerInterface $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(SettingsContainerInterface $options, CacheInterface $cache, LoggerInterface $logger);
29 30
 
Please login to merge, or discard this patch.
src/Output/BBCodeOutputInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -24,6 +24,7 @@
 block discarded – undo
24 24
 	 * @param \chillerlan\Settings\SettingsContainerInterface $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(SettingsContainerInterface $options, CacheInterface $cache, LoggerInterface $logger);
29 30
 
Please login to merge, or discard this patch.
src/Output/HTML/Expanders.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  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
35
-		       '<div id="'.$id.'" class="'.$this->tag.'-body" style="display:none;">'.$this->content.'</div>'.
36
-		       '</div>';
34
+			   '<div data-id="'.$id.'" class="'.$this->tag.'-header expander"><span>'.$this->tag.': '.$this->getAttribute('desc').'</span></div>'. // @todo: desc in tag attribute
35
+			   '<div id="'.$id.'" class="'.$this->tag.'-body" style="display:none;">'.$this->content.'</div>'.
36
+			   '</div>';
37 37
 	}
38 38
 
39 39
 	/**
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 
51 51
 		// @todo
52 52
 		return '<div class="quote-container">'.
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.)
55
-		       '</div>';
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.)
55
+			   '</div>';
56 56
 	}
57 57
 
58 58
 }
Please login to merge, or discard this patch.
src/Output/HTML/Basic.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -169,11 +169,11 @@
 block discarded – undo
169 169
 		$list_tag = (count($this->attributes) === 0 || $this->attributeIn('type', $ul) ? 'ul' : 'ol');
170 170
 
171 171
 		return '<'.$list_tag.' class="bb-list '.$this->attributeKeyIn('type', $types, 'disc').'" '
172
-		       .(is_numeric($start) && $this->attributeIn('type', $ol) ? ' start="'.ceil($start).'"' : '')
173
-		       .($this->getAttribute('reversed') && $this->attributeIn('type', $ol) ? ' reversed="true"' : '')
174
-		       .'>'
175
-		       .'<li>'.implode(array_slice(explode('[*]', $this->content), true), '</li><li>').'</li>' // nasty
176
-		       .'</'.$list_tag.'>';
172
+			   .(is_numeric($start) && $this->attributeIn('type', $ol) ? ' start="'.ceil($start).'"' : '')
173
+			   .($this->getAttribute('reversed') && $this->attributeIn('type', $ol) ? ' reversed="true"' : '')
174
+			   .'>'
175
+			   .'<li>'.implode(array_slice(explode('[*]', $this->content), true), '</li><li>').'</li>' // nasty
176
+			   .'</'.$list_tag.'>';
177 177
 	}
178 178
 
179 179
 }
Please login to merge, or discard this patch.
src/Output/HTML/Code.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
 
41 41
 		// @todo
42 42
 		return '<div data-id="'.$id.'" class="expander code-header '.$this->tag.'">'.($desc ? ' - <span>'.$desc.'</span>' : '').'</div>'
43
-		       .'<pre id="'.$id.'" class="code-body" style="display:'.($this->getAttribute('hide') ? 'none' : 'block').';">'
44
-		       .'<code class="language-'.$this->tag.'">'.$this->content.'</code></pre>'; // sanitize
43
+			   .'<pre id="'.$id.'" class="code-body" style="display:'.($this->getAttribute('hide') ? 'none' : 'block').';">'
44
+			   .'<code class="language-'.$this->tag.'">'.$this->content.'</code></pre>'; // sanitize
45 45
 	}
46 46
 
47 47
 }
Please login to merge, or discard this patch.