Revert "rector: arrrrr"

This reverts commit 16c0cd10d8.
This commit is contained in:
Andras Bacsai
2025-01-07 15:31:43 +01:00
parent da07b4fdcf
commit 1fe4dd722b
349 changed files with 3689 additions and 4184 deletions

View File

@@ -10,7 +10,6 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Http;
use RuntimeException;
class SendMessageToPushoverJob implements ShouldBeEncrypted, ShouldQueue
{
@@ -31,7 +30,7 @@ class SendMessageToPushoverJob implements ShouldBeEncrypted, ShouldQueue
public int $maxExceptions = 5;
public function __construct(
public PushoverMessage $pushoverMessage,
public PushoverMessage $message,
public string $token,
public string $user,
) {
@@ -43,9 +42,9 @@ class SendMessageToPushoverJob implements ShouldBeEncrypted, ShouldQueue
*/
public function handle(): void
{
$response = Http::post('https://api.pushover.net/1/messages.json', $this->pushoverMessage->toPayload($this->token, $this->user));
$response = Http::post('https://api.pushover.net/1/messages.json', $this->message->toPayload($this->token, $this->user));
if ($response->failed()) {
throw new RuntimeException('Pushover notification failed with '.$response->status().' status code.'.$response->body());
throw new \RuntimeException('Pushover notification failed with '.$response->status().' status code.'.$response->body());
}
}
}