@@ -155,6 +155,7 @@ discard block |
||
| 155 | 155 | * Find element in HTML Dom |
| 156 | 156 | * |
| 157 | 157 | * @param string $content - content to be searched through |
| 158 | + * @param integer $nth |
|
| 158 | 159 | * @return object |
| 159 | 160 | */ |
| 160 | 161 | private function find($content, $selector, $nth = null) |
@@ -204,6 +205,7 @@ discard block |
||
| 204 | 205 | * Check whether errors have been returned |
| 205 | 206 | * |
| 206 | 207 | * @param string $content - response body of a request |
| 208 | + * @param string $selector |
|
| 207 | 209 | * @return boolean - false if an element described by the selector exists |
| 208 | 210 | */ |
| 209 | 211 | private function check($content, $selector) |
@@ -181,8 +181,11 @@ |
||
| 181 | 181 | if (!empty($element->plaintext)) { |
| 182 | 182 | $value = trim($value); |
| 183 | 183 | $value_int = intval($value); |
| 184 | - if (is_int($value_int)) $result = $value_int; |
|
| 185 | - else $result = $value; |
|
| 184 | + if (is_int($value_int)) { |
|
| 185 | + $result = $value_int; |
|
| 186 | + } else { |
|
| 187 | + $result = $value; |
|
| 188 | + } |
|
| 186 | 189 | } else { |
| 187 | 190 | $result = false; |
| 188 | 191 | } |