There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: hasProperty, p, properties, property
Loading history...
19
{
20
/**
21
* @var string|null
22
*/
23
private $email;
24
25
/**
26
* @var DateTimeInterface|null
27
*/
28
private $ts;
29
30
/**
31
* @var string|null
32
*/
33
private $ip;
34
35
36
/**
37
* @param string|null $emailId The email (log) id.
38
* @return self
39
*/
40
public function setEmail(?string $emailId)
41
{
42
$this->email = $emailId;
43
return $this;
44
}
45
46
/**
47
* @return string|null
48
*/
49
public function email(): ?string
50
{
51
return $this->email;
52
}
53
54
/**
55
* @param null|string|DateTimeInterface $ts The "timestamp" datetime value.
56
* @throws InvalidArgumentException If the timestamp is not a valid datetime value.
57
* @return self
58
*/
59
public function setTs($ts)
60
{
61
if ($ts === null) {
62
$this->ts = null;
63
return $this;
64
}
65
66
if (is_string($ts)) {
67
try {
68
$ts = new DateTime($ts);
69
} catch (Exception $e) {
70
throw new InvalidArgumentException($e->getMessage());
71
}
72
}
73
74
if (!($ts instanceof DateTimeInterface)) {
75
throw new InvalidArgumentException(
76
'Invalid "Send Date" value. Must be a date/time string or a DateTime object.'