/** * Trace constructor. * * @param User|null $initiatingUser */ public function __construct(User $initiatingUser = null) { $this->initiated = new DateTime(); if ($initiatingUser) { $this->initiator = Initiator::fromUser($initiatingUser); } }
/** * Trace constructor. * * @param Context $context * @param User|null $initiatingUser */ private function __construct(Context $context, User $initiatingUser = null) { $this->context = $context; $this->initiated = new DateTime(); if ($initiatingUser) { $this->initiator = Initiator::fromUser($initiatingUser); } }