| 1 | <?php |
||
| 7 | class UserService |
||
| 8 | { |
||
| 9 | /** @var UserRepository */ |
||
| 10 | private $userRepository; |
||
| 11 | |||
| 12 | public function __construct(UserRepository $userRepository) |
||
| 16 | |||
| 17 | //region Followers and following |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Get user's followers |
||
| 21 | * |
||
| 22 | * @param int $userId |
||
| 23 | * |
||
| 24 | * @return User[] |
||
| 25 | */ |
||
| 26 | public function getFollowers($userId) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get users followed by user |
||
| 35 | * |
||
| 36 | * @param int $userId |
||
| 37 | * |
||
| 38 | * @return User[] |
||
| 39 | */ |
||
| 40 | public function getFollowing($userId) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get active users followed by user |
||
| 49 | * |
||
| 50 | * @param int $userId |
||
| 51 | * |
||
| 52 | * @return User[] |
||
| 53 | */ |
||
| 54 | public function getActiveFollowing($userId) |
||
| 60 | |||
| 61 | //endregion |
||
| 62 | } |
||
| 63 |