All checks were successful
Push image to registry / build-image (push) Successful in 5m20s
32 lines
762 B
PHP
32 lines
762 B
PHP
<?php
|
|
|
|
namespace App\Notification\NotificationBody;
|
|
|
|
use App\Models\Job;
|
|
use App\Notification\NotificationBody;
|
|
use App\Notification\Stringifiable;
|
|
|
|
class JobErrorNotificationBody extends NotificationBody {
|
|
|
|
private Job $job;
|
|
private string $error;
|
|
|
|
public function __construct(Job $job, $error) {
|
|
$this->job = $job;
|
|
$this->error = $error;
|
|
}
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function toMarkdownString(): string {
|
|
return "Le job \"{$this->job->name}\" a échoué avec l'erreur :\n ```" . $this->error . "``` \nScreenshot : ";
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function toString(): string {
|
|
return "Le job \"{$this->job->name}\" a échoué avec l'erreur :\n " . $this->error;
|
|
}
|
|
}
|