Fixing style errors.

This commit is contained in:
stickler-ci 2020-08-21 06:46:00 +00:00
parent 22ff5a320f
commit 61cce2e700
2 changed files with 6 additions and 7 deletions

View File

@ -1062,13 +1062,12 @@ if (count($listofextcals))
$event->ref = $event->id; $event->ref = $event->id;
$userId = $userstatic->findUserIdByEmail($namecal); $userId = $userstatic->findUserIdByEmail($namecal);
if(!empty($userId)) if (!empty($userId))
{ {
$event->userassigned[$userId] = $userId; $event->userassigned[$userId] = $userId;
$event->percentage = -1; $event->percentage = -1;
} }
else else {
{
$event->type_code = "ICALEVENT"; $event->type_code = "ICALEVENT";
} }

View File

@ -3248,12 +3248,12 @@ class User extends CommonObject
/** /**
* Find a user by the given e-mail or part of a e-mail and return its user id when found * Find a user by the given e-mail or part of a e-mail and return its user id when found
* *
* @param string $email The full e-mail or a part of a e-mail * @param string $email The full e-mail or a part of a e-mail
* @return int|null The id of the user when found, otherwise null * @return int|null The id of the user when found, otherwise null
*/ */
public function findUserIdByEmail($email) public function findUserIdByEmail($email)
{ {
if($this->findUserIdByEmailCache[$email]) if ($this->findUserIdByEmailCache[$email])
{ {
return $this->findUserIdByEmailCache[$email]; return $this->findUserIdByEmailCache[$email];
} }
@ -3274,8 +3274,8 @@ class User extends CommonObject
return 0; return 0;
} }
$this->findUserIdByEmailCache[$email] = (int)$obj->rowid; $this->findUserIdByEmailCache[$email] = (int) $obj->rowid;
return (int)$obj->rowid; return (int) $obj->rowid;
} }
} }