| 1 | <?php |
||
| 15 | class PendingReply |
||
| 16 | { |
||
| 17 | private $channel; |
||
| 18 | private $chat; |
||
| 19 | private $user; |
||
| 20 | private $text; |
||
| 21 | private $template; |
||
| 22 | private $attachment; |
||
| 23 | private $delay; |
||
| 24 | |||
| 25 | 5 | public function __construct(Channel $channel, Chat $chat, User $user) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Set reply text. |
||
| 34 | * |
||
| 35 | * @param null|string $text |
||
| 36 | * |
||
| 37 | * @return static |
||
| 38 | */ |
||
| 39 | 3 | public function text(?string $text) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Set template for reply. |
||
| 48 | * |
||
| 49 | * @param Template|null $template |
||
| 50 | * |
||
| 51 | * @return static |
||
| 52 | */ |
||
| 53 | 2 | public function template(?Template $template) |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Set attachment for send. |
||
| 62 | * |
||
| 63 | * @param Attachment $attachment |
||
| 64 | * |
||
| 65 | * @return static |
||
| 66 | */ |
||
| 67 | 2 | public function attachment(Attachment $attachment) |
|
| 73 | |||
| 74 | /** |
||
| 75 | * Set the desired delay for the job. |
||
| 76 | * |
||
| 77 | * @param \DateTime|int|null $delay |
||
| 78 | * |
||
| 79 | * @return static |
||
| 80 | */ |
||
| 81 | 2 | public function delay($delay) |
|
| 87 | |||
| 88 | 5 | public function __destruct() |
|
| 109 | } |
||
| 110 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: