Repo Interface für tests
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
namespace MintyPHP\Service\Tenant;
|
||||
|
||||
use MintyPHP\Repository\Org\DepartmentRepository;
|
||||
use MintyPHP\Repository\Org\DepartmentRepositoryInterface;
|
||||
use MintyPHP\Repository\Tenant\TenantRepository;
|
||||
use MintyPHP\Repository\Tenant\TenantRepositoryInterface;
|
||||
use MintyPHP\Repository\Tenant\UserTenantRepository;
|
||||
use MintyPHP\Repository\Tenant\UserTenantRepositoryInterface;
|
||||
|
||||
class TenantRepositoryFactory
|
||||
{
|
||||
@@ -12,17 +15,17 @@ class TenantRepositoryFactory
|
||||
private ?DepartmentRepository $departmentRepository = null;
|
||||
private ?UserTenantRepository $userTenantRepository = 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 createUserTenantRepository(): UserTenantRepository
|
||||
public function createUserTenantRepository(): UserTenantRepositoryInterface
|
||||
{
|
||||
return $this->userTenantRepository ??= new UserTenantRepository();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user