| @@ -19,11 +19,12 @@ | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | private function getDateParameter(array $data, string $name): ?string |
| 22 | 22 | { |
| 23 | - $value = (string) ($data[$name] ?? ''); | |
| 23 | + $isValid = isset($data[$name]['date']) === true && isset($data[$name]['time']) === true | |
| 24 | + && (string) $data[$name]['date'] !== '' && (string) $data[$name]['time'] !== ''; | |
| 24 | 25 | |
| 25 | - return ($value !== '') ? $value : null; | |
| 26 | + return ($isValid === true) ? ((string) $data[$name]['date']) . 'T' . $data[$name]['time'] : null; | |
| 26 | 27 | } |
| 27 | 28 | |
| 28 | 29 | /** |
| 29 | 30 | * @throws Exception |
| @@ -30,9 +31,9 @@ | ||
| 30 | 31 | */ |
| 31 | 32 | private function setUserGroups( |
| 32 | 33 | array $filteredUserGroups, |
| 33 | 34 | string $objectType, |
| 34 | - int|string|null $objectId, | |
| 35 | + int|string $objectId, | |
| 35 | 36 | array $addUserGroups, |
| 36 | 37 | array $removeUserGroups |
| 37 | 38 | ): void { |
| 38 | 39 | /** @var UserGroup $userGroup */ |
| @@ -57,9 +58,9 @@ | ||
| 57 | 58 | /** |
| 58 | 59 | * @throws UserGroupAssignmentException |
| 59 | 60 | * @throws UserGroupTypeException |
| 60 | 61 | */ |
| 61 | - private function setDynamicGroups(string $objectType, int|string|null $objectId, array $addDynamicUserGroups): void | |
| 62 | + private function setDynamicGroups(string $objectType, int|string $objectId, array $addDynamicUserGroups): void | |
| 62 | 63 | { |
| 63 | 64 | foreach ($addDynamicUserGroups as $dynamicUserGroupKey => $addDynamicUserGroup) { |
| 64 | 65 | $dynamicUserGroupData = explode('|', $dynamicUserGroupKey); |
| 65 | 66 | |
| @@ -84,9 +85,9 @@ | ||
| 84 | 85 | /** |
| 85 | 86 | * @throws UserGroupTypeException |
| 86 | 87 | * @throws Exception |
| 87 | 88 | */ |
| 88 | - private function setDefaultGroups(array $filteredUserGroups, string $objectType, int|string|null $objectId): void | |
| 89 | + private function setDefaultGroups(array $filteredUserGroups, string $objectType, int|string $objectId): void | |
| 89 | 90 | { |
| 90 | 91 | /** |
| 91 | 92 | * @var UserGroup[] $userGroupsToCheck |
| 92 | 93 | */ |
| @@ -110,9 +111,9 @@ | ||
| 110 | 111 | * @throws Exception |
| 111 | 112 | */ |
| 112 | 113 | public function assignObjectToUserGroups( |
| 113 | 114 | string $objectType, |
| 114 | - int|string|null $objectId, | |
| 115 | + int|string $objectId, | |
| 115 | 116 | array $addUserGroups, |
| 116 | 117 | array $removeUserGroups, |
| 117 | 118 | array $addDynamicUserGroups |
| 118 | 119 | ): void { |