fix type bug

This commit is contained in:
Dennis Eichhorn 2020-03-03 22:41:17 +01:00
parent b7eca81385
commit 047f348569

View File

@ -357,7 +357,7 @@ class TaskElement implements \JsonSerializable
{ {
foreach ($this->accRelation as $acc) { foreach ($this->accRelation as $acc) {
if (($acc->getDuty() === DutyType::TO if (($acc->getDuty() === DutyType::TO
&& ($acc->getRelation() instanceof AccountRelation) && $acc->getRelation()->getId() === $id) && ($acc->getRelation() instanceof Account) && $acc->getRelation()->getId() === $id)
|| ($acc->getDuty() === DutyType::TO || ($acc->getDuty() === DutyType::TO
&& $acc->getRelation() === $id) && $acc->getRelation() === $id)
) { ) {
@ -381,7 +381,7 @@ class TaskElement implements \JsonSerializable
{ {
foreach ($this->grpRelation as $grp) { foreach ($this->grpRelation as $grp) {
if (($grp->getDuty() === DutyType::TO if (($grp->getDuty() === DutyType::TO
&& ($grp->getRelation() instanceof GroupRelation) && $grp->getRelation()->getId() === $id) && ($grp->getRelation() instanceof Group) && $grp->getRelation()->getId() === $id)
|| ($grp->getDuty() === DutyType::TO || ($grp->getDuty() === DutyType::TO
&& $grp->getRelation() === $id) && $grp->getRelation() === $id)
) { ) {
@ -405,7 +405,7 @@ class TaskElement implements \JsonSerializable
{ {
foreach ($this->accRelation as $acc) { foreach ($this->accRelation as $acc) {
if (($acc->getDuty() === DutyType::CC if (($acc->getDuty() === DutyType::CC
&& ($acc->getRelation() instanceof AccountRelation) && $acc->getRelation()->getId() === $id) && ($acc->getRelation() instanceof Account) && $acc->getRelation()->getId() === $id)
|| ($acc->getDuty() === DutyType::CC || ($acc->getDuty() === DutyType::CC
&& $acc->getRelation() === $id) && $acc->getRelation() === $id)
) { ) {
@ -429,7 +429,7 @@ class TaskElement implements \JsonSerializable
{ {
foreach ($this->grpRelation as $grp) { foreach ($this->grpRelation as $grp) {
if (($grp->getDuty() === DutyType::CC if (($grp->getDuty() === DutyType::CC
&& ($grp->getRelation() instanceof GroupRelation) && $grp->getRelation()->getId() === $id) && ($grp->getRelation() instanceof Group) && $grp->getRelation()->getId() === $id)
|| ($grp->getDuty() === DutyType::CC || ($grp->getDuty() === DutyType::CC
&& $grp->getRelation() === $id) && $grp->getRelation() === $id)
) { ) {