From f35e9f35a2e014cfd1ff522537b1cd6e8c9736df Mon Sep 17 00:00:00 2001 From: Robert Zondervan Date: Wed, 18 Dec 2024 15:37:28 +0100 Subject: [PATCH] Yet some more PR comments --- lib/Service/ObjectService.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/Service/ObjectService.php b/lib/Service/ObjectService.php index 692e76a..c1d8e6a 100644 --- a/lib/Service/ObjectService.php +++ b/lib/Service/ObjectService.php @@ -252,9 +252,20 @@ public function getOpenRegisters(): ?\OCA\OpenRegister\Service\ObjectService return null; } + /** + * Get the mapper for the given objecttype (usually the proper instantiation of the objectService of OpenRegister. + * + * @param string|null $objecttype The objecttype as string + * @param int|null $schema The openregister schema + * @param int|null $register The openregister register + * + * @return QBMapper|\OCA\OpenRegister\Service\ObjectService|null The resulting mapper + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ public function getMapper(?string $objecttype = null, ?int $schema = null, ?int $register = null): QBMapper|\OCA\OpenRegister\Service\ObjectService|null { - if($register !== null && $schema !== null && $objecttype === null) { + if ($register !== null && $schema !== null && $objecttype === null) { return $this->getOpenRegisters()->getMapper(register: $register, schema: $schema); }