Completed
Branch master (aa8b3c)
by Billie
04:37
created
src/PurpleBooth/Parser.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -76,6 +76,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/PurpleBooth/HtmlStripperExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.