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\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();
}