@@ -55,9 +55,13 @@ discard block |
||
| 55 | 55 | ] |
| 56 | 56 | ); |
| 57 | 57 | |
| 58 | - if ($this->makeRequest($request) === false) return false; |
|
| 58 | + if ($this->makeRequest($request) === false) { |
|
| 59 | + return false; |
|
| 60 | + } |
|
| 59 | 61 | |
| 60 | - if ($this->_result['situacao'] !== 'OK') return false; |
|
| 62 | + if ($this->_result['situacao'] !== 'OK') { |
|
| 63 | + return false; |
|
| 64 | + } |
|
| 61 | 65 | |
| 62 | 66 | return true; |
| 63 | 67 | } |
@@ -89,7 +93,9 @@ discard block |
||
| 89 | 93 | { |
| 90 | 94 | $id = intval($id); |
| 91 | 95 | |
| 92 | - if ($id > 0) $this->_query['id'] = $id; |
|
| 96 | + if ($id > 0) { |
|
| 97 | + $this->_query['id'] = $id; |
|
| 98 | + } |
|
| 93 | 99 | |
| 94 | 100 | return $this; |
| 95 | 101 | } |
@@ -124,12 +130,16 @@ discard block |
||
| 124 | 130 | ] |
| 125 | 131 | ); |
| 126 | 132 | |
| 127 | - if ($this->makeRequest($request) === false) return false; |
|
| 133 | + if ($this->makeRequest($request) === false) { |
|
| 134 | + return false; |
|
| 135 | + } |
|
| 128 | 136 | |
| 129 | 137 | // resets the filters |
| 130 | 138 | $this->setFilter(); |
| 131 | 139 | |
| 132 | - if (is_array($this->_result)) return true; |
|
| 140 | + if (is_array($this->_result)) { |
|
| 141 | + return true; |
|
| 142 | + } |
|
| 133 | 143 | |
| 134 | 144 | return false; |
| 135 | 145 | } |
@@ -142,7 +152,9 @@ discard block |
||
| 142 | 152 | |
| 143 | 153 | foreach ($this->_result as $key => $result) { |
| 144 | 154 | |
| 145 | - if (array_key_exists('id_sms_read', $result) === false) continue; |
|
| 155 | + if (array_key_exists('id_sms_read', $result) === false) { |
|
| 156 | + continue; |
|
| 157 | + } |
|
| 146 | 158 | |
| 147 | 159 | $id = $result['id_sms_read']; |
| 148 | 160 | $date = \DateTime::createFromFormat('d/m/Y H:i:s', $result['data_read'], $this->_apiTimeZone); |
@@ -178,7 +190,9 @@ discard block |
||
| 178 | 190 | |
| 179 | 191 | $this->makeRequest($request); |
| 180 | 192 | |
| 181 | - if (array_key_exists('saldo_sms', $this->_result) === false) return 0; |
|
| 193 | + if (array_key_exists('saldo_sms', $this->_result) === false) { |
|
| 194 | + return 0; |
|
| 195 | + } |
|
| 182 | 196 | |
| 183 | 197 | return (int) $this->_result['saldo_sms']; |
| 184 | 198 | } |
@@ -219,7 +233,9 @@ discard block |
||
| 219 | 233 | |
| 220 | 234 | $response = json_decode($response->getBody(), true); |
| 221 | 235 | |
| 222 | - if (json_last_error() != JSON_ERROR_NONE) return false; |
|
| 236 | + if (json_last_error() != JSON_ERROR_NONE) { |
|
| 237 | + return false; |
|
| 238 | + } |
|
| 223 | 239 | |
| 224 | 240 | $this->_result = $response; |
| 225 | 241 | |