Repo Interface für tests

This commit is contained in:
2026-03-05 08:26:51 +01:00
parent 8f4dd5840d
commit 4b31fc7664
171 changed files with 3518 additions and 2297 deletions

View File

@@ -3,8 +3,11 @@
namespace MintyPHP\Service\Directory;
use MintyPHP\Repository\Access\RoleRepository;
use MintyPHP\Repository\Access\RoleRepositoryInterface;
use MintyPHP\Repository\Org\DepartmentRepository;
use MintyPHP\Repository\Org\DepartmentRepositoryInterface;
use MintyPHP\Repository\Tenant\TenantRepository;
use MintyPHP\Repository\Tenant\TenantRepositoryInterface;
class DirectoryRepositoryFactory
{
@@ -12,17 +15,17 @@ class DirectoryRepositoryFactory
private ?DepartmentRepository $departmentRepository = null;
private ?RoleRepository $roleRepository = null;
public function createTenantRepository(): TenantRepository
public function createTenantRepository(): TenantRepositoryInterface
{
return $this->tenantRepository ??= new TenantRepository();
}
public function createDepartmentRepository(): DepartmentRepository
public function createDepartmentRepository(): DepartmentRepositoryInterface
{
return $this->departmentRepository ??= new DepartmentRepository();
}
public function createRoleRepository(): RoleRepository
public function createRoleRepository(): RoleRepositoryInterface
{
return $this->roleRepository ??= new RoleRepository();
}