NewMessageManagerInterface::saveNewReply()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
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
15
/**
16
 * The new message manager is responsible for saving new messages
17
 *
18
 * The reason we need to persist the message and the thread is that we have no
19
 * cascade all on the messages array collection in our model thread.
20
 *
21
 * This means that only storing the thread object would result in a fatal error
22
 * See: http://docs.doctrine-project.org/en/latest/reference/working-with-associations.html#transitive-persistence-cascade-operations
23
 * The reason we did this is the performance cost.
24
 * But if it wasn't for doctrine and the performance cost we would ofcourse only store our new thread object
25
 *
26
 * @author Michiel Boeckaert <[email protected]>
27
 */
28
interface NewMessageManagerInterface
29
{
30
    /**
31
     * Saves a new thread to the storage engine.
32
     *
33
     * @param MessageInterface $message
34
     */
35
    public function saveNewThread(MessageInterface $message);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
36
37
    /**
38
     * Saves a new reply to the storage engine.
39
     *
40
     * @param MessageInterface $message
41
     */
42
    public function saveNewReply(MessageInterface $message);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
43
}
44