@@ -76,6 +76,9 @@ |
||
76 | 76 | $this->setBlockText($this->getBlockText() . $value); |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $value |
|
81 | + */ |
|
79 | 82 | private function setBlockText($value) { |
80 | 83 | $this->transformedTextStack->pop(); |
81 | 84 | $this->transformedTextStack->push($value); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | $this->blockBegin($name, $attrs); |
22 | 22 | |
23 | - switch($name) { |
|
23 | + switch ($name) { |
|
24 | 24 | case "LI": |
25 | 25 | $this->appendBlockText("* "); |
26 | 26 | break; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function endElement($parser, $name) |
31 | 31 | { |
32 | - switch($name) { |
|
32 | + switch ($name) { |
|
33 | 33 | case "P": |
34 | 34 | $this->appendBlockText("\n\n"); |
35 | 35 | break; |
@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | case "A": |
46 | 46 | $attrs = $this->blockAttributesStack->top(); |
47 | 47 | |
48 | - if(isset($attrs['HREF'])) { |
|
48 | + if (isset($attrs['HREF'])) { |
|
49 | 49 | $this->appendBlockText(" ({$attrs['HREF']})"); |
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | 53 | $blockContent = $this->blockFinished(); |
54 | 54 | |
55 | - if(count($this->transformedTextStack)) { |
|
55 | + if (count($this->transformedTextStack)) { |
|
56 | 56 | $this->appendBlockText($blockContent); |
57 | 57 | } |
58 | 58 | else { |
@@ -54,8 +54,7 @@ |
||
54 | 54 | |
55 | 55 | if(count($this->transformedTextStack)) { |
56 | 56 | $this->appendBlockText($blockContent); |
57 | - } |
|
58 | - else { |
|
57 | + } else { |
|
59 | 58 | $this->text .= $blockContent; |
60 | 59 | } |
61 | 60 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $wrappedHtml = "<root>$html</root>"; |
27 | 27 | $returnStatus = xml_parse($xml_parser, $wrappedHtml, true); |
28 | 28 | |
29 | - if(!$returnStatus) { |
|
29 | + if (!$returnStatus) { |
|
30 | 30 | return $html; |
31 | 31 | } |
32 | 32 |