@@ -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) |
@@ -27,9 +27,13 @@ |
||
| 27 | 27 | $send = $sms->send($number, $text); |
| 28 | 28 | if ($send['check']) { |
| 29 | 29 | echo "SMS was successfully sent."; |
| 30 | - if (is_int($send['free'])) echo ' This month ' . $send['free'] . ' free SMS left.'; |
|
| 31 | - else if (empty($send['free'])) echo ' This month ' . $sms->get_free() . ' free SMS left.'; |
|
| 32 | - else 'Unknown how many free SMS left this month.'; |
|
| 30 | + if (is_int($send['free'])) { |
|
| 31 | + echo ' This month ' . $send['free'] . ' free SMS left.'; |
|
| 32 | + } else if (empty($send['free'])) { |
|
| 33 | + echo ' This month ' . $sms->get_free() . ' free SMS left.'; |
|
| 34 | + } else { |
|
| 35 | + 'Unknown how many free SMS left this month.'; |
|
| 36 | + } |
|
| 33 | 37 | } else { |
| 34 | 38 | echo "SMS was not sent."; |
| 35 | 39 | } |