Add users in cc in workflow: fix code style

This commit is contained in:
nobohan
2023-03-23 11:24:21 +01:00
parent 295406d9b7
commit a3db67fd1e
4 changed files with 14 additions and 8 deletions

View File

@@ -126,19 +126,19 @@ class EntityWorkflowStep
$this->accessKey = bin2hex(openssl_random_pseudo_bytes(32));
}
public function addDestEmail(string $email): self
public function addCcUser(User $user): self
{
if (!in_array($email, $this->destEmail, true)) {
$this->destEmail[] = $email;
if (!$this->ccUser->contains($user)) {
$this->ccUser[] = $user;
}
return $this;
}
public function addCcUser(User $user): self
public function addDestEmail(string $email): self
{
if (!$this->ccUser->contains($user)) {
$this->ccUser[] = $user;
if (!in_array($email, $this->destEmail, true)) {
$this->destEmail[] = $email;
}
return $this;