@@ -14,6 +14,9 @@ |
||
| 14 | 14 | |
| 15 | 15 | protected $endTag; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param null|string $listType |
|
| 19 | + */ |
|
| 17 | 20 | public function __construct($listType, $startTag, $endTag, $listItems = array(), $attributes = array()) |
| 18 | 21 | { |
| 19 | 22 | $this->listType = $listType; |
@@ -217,12 +217,18 @@ discard block |
||
| 217 | 217 | return $diffList; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | + /** |
|
| 221 | + * @param string $type |
|
| 222 | + */ |
|
| 220 | 223 | protected function isOpeningListTag($word, $type = null) |
| 221 | 224 | { |
| 222 | 225 | $filter = $type !== null ? array('<' . $type) : array('<ul', '<ol', '<dl'); |
| 223 | 226 | return in_array(substr($word, 0, 3), $filter); |
| 224 | 227 | } |
| 225 | 228 | |
| 229 | + /** |
|
| 230 | + * @param string $type |
|
| 231 | + */ |
|
| 226 | 232 | protected function isClosingListTag($word, $type = null) |
| 227 | 233 | { |
| 228 | 234 | $filter = $type !== null ? array('</' . $type) : array('</ul', '</ol', '</dl'); |
@@ -230,6 +236,9 @@ discard block |
||
| 230 | 236 | return in_array(substr($word, 0, 4), $filter); |
| 231 | 237 | } |
| 232 | 238 | |
| 239 | + /** |
|
| 240 | + * @param string $type |
|
| 241 | + */ |
|
| 233 | 242 | protected function isOpeningListItemTag($word, $type = null) |
| 234 | 243 | { |
| 235 | 244 | $filter = $type !== null ? array('<' . $type) : array('<li', '<dd', '<dt'); |
@@ -237,6 +246,9 @@ discard block |
||
| 237 | 246 | return in_array(substr($word, 0, 3), $filter); |
| 238 | 247 | } |
| 239 | 248 | |
| 249 | + /** |
|
| 250 | + * @param string $type |
|
| 251 | + */ |
|
| 240 | 252 | protected function isClosingListItemTag($word, $type = null) |
| 241 | 253 | { |
| 242 | 254 | $filter = $type !== null ? array('</' . $type) : array('</li', '</dd', '</dt'); |
@@ -219,27 +219,27 @@ |
||
| 219 | 219 | |
| 220 | 220 | protected function isOpeningListTag($word, $type = null) |
| 221 | 221 | { |
| 222 | - $filter = $type !== null ? array('<' . $type) : array('<ul', '<ol', '<dl'); |
|
| 222 | + $filter = $type !== null ? array('<'.$type) : array('<ul', '<ol', '<dl'); |
|
| 223 | 223 | return in_array(substr($word, 0, 3), $filter); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | protected function isClosingListTag($word, $type = null) |
| 227 | 227 | { |
| 228 | - $filter = $type !== null ? array('</' . $type) : array('</ul', '</ol', '</dl'); |
|
| 228 | + $filter = $type !== null ? array('</'.$type) : array('</ul', '</ol', '</dl'); |
|
| 229 | 229 | |
| 230 | 230 | return in_array(substr($word, 0, 4), $filter); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | protected function isOpeningListItemTag($word, $type = null) |
| 234 | 234 | { |
| 235 | - $filter = $type !== null ? array('<' . $type) : array('<li', '<dd', '<dt'); |
|
| 235 | + $filter = $type !== null ? array('<'.$type) : array('<li', '<dd', '<dt'); |
|
| 236 | 236 | |
| 237 | 237 | return in_array(substr($word, 0, 3), $filter); |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | protected function isClosingListItemTag($word, $type = null) |
| 241 | 241 | { |
| 242 | - $filter = $type !== null ? array('</' . $type) : array('</li', '</dd', '</dt'); |
|
| 242 | + $filter = $type !== null ? array('</'.$type) : array('</li', '</dd', '</dt'); |
|
| 243 | 243 | |
| 244 | 244 | return in_array(substr($word, 0, 4), $filter); |
| 245 | 245 | } |