@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | if (lock::exist('BPT-HOOK')) {
|
| 15 | 15 | self::telegramVerify(); |
| 16 | 16 | BPT::$update = self::processUpdate(); |
| 17 | - } |
|
| 18 | - else {
|
|
| 17 | + } else {
|
|
| 19 | 18 | self::deleteOldLocks(); |
| 20 | 19 | } |
| 21 | 20 | } |
@@ -33,8 +32,7 @@ discard block |
||
| 33 | 32 | $update = json_decode(file_get_contents("php://input"));
|
| 34 | 33 | if ($update) {
|
| 35 | 34 | return new update($update); |
| 36 | - } |
|
| 37 | - else {
|
|
| 35 | + } else {
|
|
| 38 | 36 | BPT::close(); |
| 39 | 37 | } |
| 40 | 38 | } |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | public static function init() {
|
| 9 | 9 | if (lock::exist('BPT-MULTI')) {
|
| 10 | 10 | |
| 11 | - } |
|
| 12 | - else {
|
|
| 11 | + } else {
|
|
| 13 | 12 | |
| 14 | 13 | } |
| 15 | 14 | } |
@@ -256,15 +256,15 @@ discard block |
||
| 256 | 256 | curl_exec($ch); |
| 257 | 257 | $size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD); |
| 258 | 258 | curl_close($ch); |
| 259 | - } |
|
| 260 | - else {
|
|
| 259 | + } else {
|
|
| 261 | 260 | $size = file_exists($path) ? filesize($path) : false; |
| 262 | 261 | } |
| 263 | 262 | |
| 264 | 263 | if (isset($size) && is_numeric($size)) {
|
| 265 | 264 | return $format ? tools::byteFormat($size) : $size; |
| 266 | - } |
|
| 267 | - else return false; |
|
| 265 | + } else { |
|
| 266 | + return false; |
|
| 267 | + } |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | //fix methods after here comments |
@@ -292,15 +292,16 @@ discard block |
||
| 292 | 292 | $file->isDir() ? rmdir($file->getRealPath()) : unlink($file->getRealPath()); |
| 293 | 293 | } |
| 294 | 294 | rmdir($path); |
| 295 | - } |
|
| 296 | - else {
|
|
| 295 | + } else {
|
|
| 297 | 296 | logger::write("BPT delete function used\ndelete function cannot delete folder because its have subFiles and sub parameter haven't true value",'error');
|
| 298 | 297 | return false; |
| 299 | 298 | } |
| 300 | - } |
|
| 301 | - else rmdir($path); |
|
| 302 | - } |
|
| 303 | - else unlink($path); |
|
| 299 | + } else { |
|
| 300 | + rmdir($path); |
|
| 301 | + } |
|
| 302 | + } else { |
|
| 303 | + unlink($path); |
|
| 304 | + } |
|
| 304 | 305 | |
| 305 | 306 | return true; |
| 306 | 307 | } |
@@ -327,8 +328,9 @@ discard block |
||
| 327 | 328 | foreach ($string as $k => &$v) {
|
| 328 | 329 | if ($diff->$v) {
|
| 329 | 330 | $v = $diff->$v; |
| 330 | - } |
|
| 331 | - else unset($string[$k]); |
|
| 331 | + } else { |
|
| 332 | + unset($string[$k]); |
|
| 333 | + } |
|
| 332 | 334 | } |
| 333 | 335 | $string['status'] = $status; |
| 334 | 336 | return count($string) > 1 ? $string : ['status' => 'now']; |