1 | <?php |
||
30 | class ThreadStatusManager implements ThreadStatusManagerInterface |
||
31 | { |
||
32 | /** |
||
33 | * A thread repository instance. |
||
34 | * |
||
35 | * @var ThreadRepositoryInterface |
||
36 | */ |
||
37 | private $threadRepository; |
||
38 | |||
39 | /** |
||
40 | * A message repository instance. |
||
41 | * |
||
42 | * @var MessageRepositoryInterface |
||
43 | */ |
||
44 | private $messageRepository; |
||
45 | |||
46 | /** |
||
47 | * A read status manager instance. |
||
48 | * |
||
49 | * @var ReadStatusManagerInterface |
||
50 | */ |
||
51 | private $readStatusManager; |
||
52 | |||
53 | /** |
||
54 | * @param ThreadRepositoryInterface $threadRepository A thread repository |
||
55 | * @param MessageRepositoryInterface $messageRepository A message repository |
||
56 | * @param ReadStatusManagerInterface $readStatusManager A read status manager |
||
57 | */ |
||
58 | public function __construct( |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function updateThreadStatusForParticipant( |
||
100 | |||
101 | /** |
||
102 | * When archiving an active thread we want to mark all unread messages as read. |
||
103 | * |
||
104 | * Since this is a thread status update we do this here. We do use the read status manager for this should also |
||
105 | * dispatch a new read status event. |
||
106 | * |
||
107 | * @param ThreadInterface $thread The current thread |
||
108 | * @param ParticipantInterface $participant The participant who wants to update the thread status |
||
109 | * @param ThreadStatus $oldThreadStatus The integer value of the old thread status |
||
110 | * @param ThreadStatus $newThreadStatus The integer value of the new thread status |
||
111 | * |
||
112 | * @return boolean false if no messages where marked as read, true if there were messages marked as read |
||
113 | */ |
||
114 | protected function maybeMarkMessagesAsRead( |
||
136 | |||
137 | /** |
||
138 | * Checks whether we are updating the thread status from an active to an archived thread |
||
139 | * |
||
140 | * @param ThreadStatus $oldThreadStatus |
||
141 | * @param ThreadStatus $newThreadStatus |
||
142 | * |
||
143 | * @return boolean true if we are updating an active thread to an archived thread false otherwise |
||
144 | */ |
||
145 | protected function updateActiveThreadToArchivedThread(ThreadStatus $oldThreadStatus, ThreadStatus $newThreadStatus) |
||
156 | } |
||
157 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.