@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | // Consider this node a potential dangling parent |
84 | - $this->_dangling[$level] =& $node; |
|
84 | + $this->_dangling[$level] = & $node; |
|
85 | 85 | |
86 | 86 | return $node; |
87 | 87 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | private function _processDocument($doc) |
95 | 95 | { |
96 | - $this->_tree =& $this->_newNode(self::$prefix, '', 0); |
|
96 | + $this->_tree = & $this->_newNode(self::$prefix, '', 0); |
|
97 | 97 | $n = 1; |
98 | 98 | |
99 | 99 | $xpath = new DOMXPath($doc); |
@@ -102,16 +102,16 @@ discard block |
||
102 | 102 | foreach ($xpath->query($query) as $h) { |
103 | 103 | $text = $this->_getPlainText($h); |
104 | 104 | $level = (int) substr($h->tagName, 1); |
105 | - $id = self::$prefix . $n; |
|
105 | + $id = self::$prefix.$n; |
|
106 | 106 | ++$n; |
107 | 107 | |
108 | 108 | // Build the tree |
109 | - $parent =& $this->_getParent($level); |
|
110 | - $node =& $this->_newNode($id, $text, $level); |
|
111 | - if (! isset($parent['children'])) { |
|
109 | + $parent = & $this->_getParent($level); |
|
110 | + $node = & $this->_newNode($id, $text, $level); |
|
111 | + if (!isset($parent['children'])) { |
|
112 | 112 | $parent['children'] = array(); |
113 | 113 | } |
114 | - $parent['children'][] =& $node; |
|
114 | + $parent['children'][] = & $node; |
|
115 | 115 | |
116 | 116 | // Prepend the anchor |
117 | 117 | $anchor = $doc->createElement('a'); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | private function _dumpBranch($node, $indent = '') |
135 | 135 | { |
136 | - echo $indent . $node['title'] . "\n"; |
|
136 | + echo $indent.$node['title']."\n"; |
|
137 | 137 | if (isset($node['children'])) { |
138 | 138 | foreach ($node['children'] as &$child) { |
139 | 139 | $this->_dumpBranch($child, "$indent\t"); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | public function process() |
176 | 176 | { |
177 | 177 | // Check if $this->_raw_html is valid |
178 | - if (! is_string($this->_raw_html) || empty($this->_raw_html)) { |
|
178 | + if (!is_string($this->_raw_html) || empty($this->_raw_html)) { |
|
179 | 179 | return false; |
180 | 180 | } |
181 | 181 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | // Parse the HTML into a DOMDocument tree |
188 | 188 | $doc = new DOMDocument(); |
189 | - if (! @$doc->loadHTML($html)) { |
|
189 | + if (!@$doc->loadHTML($html)) { |
|
190 | 190 | return false; |
191 | 191 | } |
192 | 192 |