chore: code styling via pint

This commit is contained in:
idevakk
2025-11-14 01:51:35 -08:00
parent 3892c48ef2
commit 90ab79b3a2
121 changed files with 1003 additions and 892 deletions

View File

@@ -2,18 +2,20 @@
namespace App;
use Log;
use Http;
use Exception;
use Http;
use Log;
trait NotifyMe
{
function sendTelegramNotification($message) {
public function sendTelegramNotification($message)
{
$botToken = config('app.notify_tg_bot_token');
$chatId = config('app.notify_tg_chat_id');
if (!$botToken || !$chatId) {
if (! $botToken || ! $chatId) {
Log::error('Telegram bot token or chat ID not configured');
return false;
}
@@ -22,14 +24,16 @@ trait NotifyMe
$data = [
'chat_id' => $chatId,
'text' => $message,
'parse_mode' => 'HTML'
'parse_mode' => 'HTML',
];
try {
$response = Http::post($url, $data);
return $response->successful();
} catch (Exception $e) {
Log::error('Failed to send Telegram notification: ' . $e->getMessage());
Log::error('Failed to send Telegram notification: '.$e->getMessage());
return false;
}
}