| Total Complexity | 6 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class LinkStudentsHelper { |
||
| 9 | |||
| 10 | public const StudentEduPerson = 'student'; |
||
| 11 | |||
| 12 | private $repository; |
||
| 13 | |||
| 14 | 2 | public function __construct(UserRepositoryInterface $userRepository) { |
|
| 15 | 2 | $this->repository = $userRepository; |
|
| 16 | 2 | } |
|
| 17 | |||
| 18 | /** |
||
| 19 | * Establishes a link between the current user and a student user |
||
| 20 | * |
||
| 21 | * @param User $currentUser |
||
| 22 | * @param User $student |
||
| 23 | * @throws NotAStudentException |
||
| 24 | */ |
||
| 25 | public function link(User $currentUser, User $student) { |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Returns all linked student users |
||
| 41 | * |
||
| 42 | * @param User $user |
||
| 43 | * @return User[] |
||
| 44 | */ |
||
| 45 | 2 | public function getLinks(User $user): array { |
|
| 58 | } |
||
| 59 | } |