updateReadStatusForMessageCollection()
last analyzed

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the MilioooMessageBundle package.
5
 *
6
 * (c) Michiel boeckaert <[email protected]>
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Miliooo\Messaging\Manager;
12
13
use Miliooo\Messaging\Model\MessageInterface;
14
use Miliooo\Messaging\User\ParticipantInterface;
15
use Miliooo\Messaging\ValueObjects\ReadStatus;
16
17
/**
18
 * The read status manager is responsible for changing the read statuses of messages.
19
 *
20
 * @author Michiel Boeckaert <[email protected]>
21
 */
22
interface ReadStatusManagerInterface
23
{
24
    /**
25
     * Updates the read status for a message collection for a given participant.
26
     *
27
     * If the old read status equals the new read status no updates happen
28
     * If the participant is not part of the messageMeta no updates happen
29
     *
30
     * @param ReadStatus           $updatedReadStatus The new read status
31
     * @param ParticipantInterface $participant       The participant for who we update the read status
32
     * @param MessageInterface[]   $messages          array of messageInterfaces for whom we update the reads status
33
     *
34
     * @return MessageInterface[]|[] Array with the updated messages, an empty array if no messages were updated
0 ignored issues
show
Documentation introduced by
The doc-type MessageInterface[]|[] could not be parsed: Unknown type name "" at position 19. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
35
     */
36
    public function updateReadStatusForMessageCollection(
37
        ReadStatus $updatedReadStatus,
38
        ParticipantInterface $participant,
39
        $messages = []
40
    );
41
}
42