Skip to content

Commit

Permalink
Yet some more PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Dec 18, 2024
1 parent bf178e6 commit f35e9f3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/Service/ObjectService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f35e9f3

Please sign in to comment.