Repo Interface für tests
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
namespace MintyPHP\Service\Access;
|
||||
|
||||
use MintyPHP\Repository\Access\PermissionRepository;
|
||||
use MintyPHP\Repository\Access\PermissionRepositoryInterface;
|
||||
use MintyPHP\Repository\Access\RolePermissionRepository;
|
||||
use MintyPHP\Repository\Access\RolePermissionRepositoryInterface;
|
||||
use MintyPHP\Repository\Access\UserRoleRepository;
|
||||
use MintyPHP\Repository\Access\UserRoleRepositoryInterface;
|
||||
|
||||
class AccessRepositoryFactory
|
||||
{
|
||||
@@ -12,17 +15,17 @@ class AccessRepositoryFactory
|
||||
private ?RolePermissionRepository $rolePermissionRepository = null;
|
||||
private ?UserRoleRepository $userRoleRepository = null;
|
||||
|
||||
public function createPermissionRepository(): PermissionRepository
|
||||
public function createPermissionRepository(): PermissionRepositoryInterface
|
||||
{
|
||||
return $this->permissionRepository ??= new PermissionRepository();
|
||||
}
|
||||
|
||||
public function createRolePermissionRepository(): RolePermissionRepository
|
||||
public function createRolePermissionRepository(): RolePermissionRepositoryInterface
|
||||
{
|
||||
return $this->rolePermissionRepository ??= new RolePermissionRepository();
|
||||
}
|
||||
|
||||
public function createUserRoleRepository(): UserRoleRepository
|
||||
public function createUserRoleRepository(): UserRoleRepositoryInterface
|
||||
{
|
||||
return $this->userRoleRepository ??= new UserRoleRepository();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user