public static function beingSent(Campaign $campaign): self
12
{
13
return new static("The campaign `{$campaign->name}` can't be sent, because it is already being sent.");
14
}
15
16
public static function alreadySent(Campaign $campaign): self
17
{
18
return new static("The campaign `{$campaign->name}` can't be sent, because it was already sent.");
19
}
20
21
public static function noListSet(Campaign $campaign)
22
{
23
return new static("The campaign `{$campaign->name}` can't be sent, because there is no list set to send it to.");
24
}
25
26
public static function noSubjectSet(Campaign $campaign)
27
{
28
return new static("The campaign `{$campaign->name}` can't be sent, because no subject has been set.");
29
}
30
31
public static function noContent(Campaign $campaign): self
32
{
33
return new static("The campaign `{$campaign->name}` can't be sent because not content has been set.");
34
}
35
36
public static function invalidContent(Campaign $campaign, ErrorException $errorException): self
37
{
38
return new static("The campaign `{$campaign->name}` can't be sent because the content isn't valid. Please check if the html is valid. DOMDocument reported: `{$errorException->getMessage()}`", 0, $errorException);