Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function findThreadForParticipant(ParticipantInterface $participant, $threadId) |
||
43 | { |
||
44 | $thread = $this->threadProvider->findThreadForParticipant($threadId, $participant); |
||
45 | if (!$thread) { |
||
46 | return null; |
||
47 | } |
||
48 | |||
49 | if (!$this->canSeeThread->isSatisfiedBy($participant, $thread)) { |
||
50 | throw new AccessDeniedException('Not allowed to see this thread'); |
||
51 | } |
||
52 | |||
53 | return $thread; |
||
54 | } |
||
55 | } |
||
56 |