| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public static function downloadFile (string|null $destination = null, string|null $file_id = null): bool { |
||
| 30 | $file = telegram::getFile($file_id); |
||
| 31 | if (isset($file->file_path)) { |
||
| 32 | $file_path = settings::$down_url . 'bot' . settings::$token . '/' . $file->file_path; |
||
| 33 | return tools::downloadFile($file_path, $destination); |
||
|
|
|||
| 34 | } |
||
| 35 | else { |
||
| 36 | return false; |
||
| 37 | } |
||
| 39 | } |