| Total Complexity | 9 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | final class DeleteActivityLogMessage implements DeleteActivityLogMessageInterface |
||
| 8 | { |
||
| 9 | private \DateTime $dateTime; |
||
| 10 | private string $actionName; |
||
| 11 | private ?array $userInfo = null; |
||
| 12 | private ?string $requestUrl = null; |
||
| 13 | |||
| 14 | public function __construct(private $objectId, private readonly string $className, ?string $actionName = null) |
||
| 15 | { |
||
| 16 | $this->dateTime = new \DateTime(); |
||
| 17 | $this->actionName = $actionName ?? ActivityLogAction::DELETED; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getObjectId(): string |
||
| 21 | { |
||
| 22 | return $this->objectId; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getDateTime(): \DateTime |
||
| 26 | { |
||
| 27 | return $this->dateTime; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getActionName(): string |
||
| 31 | { |
||
| 32 | return $this->actionName; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getClassName(): string |
||
| 36 | { |
||
| 37 | return $this->className; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getUser(): ?array |
||
| 41 | { |
||
| 42 | return $this->userInfo; |
||
| 43 | } |
||
| 44 | |||
| 45 | public function setUser(?array $userInfo): void |
||
| 46 | { |
||
| 47 | $this->userInfo = $userInfo; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getRequestUrl(): ?string |
||
| 51 | { |
||
| 52 | return $this->requestUrl; |
||
| 53 | } |
||
| 54 | |||
| 55 | public function setRequestUrl(?string $requestUrl): void |
||
| 58 | } |
||
| 59 | } |
||
| 60 |