From f29bad3b9e36fdf79b659b415d94462e71af8ccf Mon Sep 17 00:00:00 2001 From: Sylry Date: Thu, 17 May 2018 12:48:21 +0200 Subject: [PATCH] Fix coding standards. --- src/Converter/ListItemConverter.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Converter/ListItemConverter.php b/src/Converter/ListItemConverter.php index e1fdeea..c56ab89 100644 --- a/src/Converter/ListItemConverter.php +++ b/src/Converter/ListItemConverter.php @@ -13,6 +13,11 @@ class ListItemConverter implements ConverterInterface, ConfigurationAwareInterfa */ protected $config; + /** + * @var string + */ + protected $listItemStyle; + /** * @param Configuration $config */ @@ -46,15 +51,15 @@ public function convert(ElementInterface $element) if ($list_type === 'ul') { $list_item_style = $this->config->getOption('list_item_style', '-'); $list_item_style_alternate = $this->config->getOption('list_item_style_alternate'); - if (!isset($this->list_item_style)) { - $this->list_item_style = $list_item_style_alternate ? $list_item_style_alternate : $list_item_style; + if (!isset($this->listItemStyle)) { + $this->listItemStyle = $list_item_style_alternate ? $list_item_style_alternate : $list_item_style; } if ($list_item_style_alternate && $level == 0 && $element->getSiblingPosition() === 1) { - $this->list_item_style = $this->list_item_style == $list_item_style ? $list_item_style_alternate : $list_item_style; + $this->listItemStyle = $this->listItemStyle == $list_item_style ? $list_item_style_alternate : $list_item_style; } - return $prefix . $this->list_item_style . ' ' . $value . "\n"; + return $prefix . $this->listItemStyle . ' ' . $value . "\n"; } if ($list_type === 'ol' && $start = $element->getParent()->getAttribute('start')) {