ReplyBuilderModel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 34
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getThread() 0 4 1
A processExtra() 0 4 1
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\Builder\Model;
12
13
use Miliooo\Messaging\Form\FormModel\ReplyMessageInterface;
14
use Miliooo\Messaging\Model\ThreadInterface;
15
16
/**
17
 * The reply builder model contains all the data needed to build a new reply.
18
 *
19
 * @author Michiel Boeckaert <[email protected]>
20
 */
21
class ReplyBuilderModel extends AbstractMessageBuilderModel
22
{
23
    /**
24
     * @var ReplyMessageInterface
25
     */
26
    private $replyModel;
27
28
    /**
29
     * @param ReplyMessageInterface $replyModel
30
     */
31
    public function __construct(ReplyMessageInterface $replyModel)
32
    {
33
        $this->replyModel = $replyModel;
34
        parent::__construct($replyModel);
35
    }
36
37
    /**
38
     * Gets the thread where we reply on
39
     *
40
     * @return ThreadInterface
41
     */
42
    public function getThread()
43
    {
44
        return $this->replyModel->getThread();
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    protected function processExtra()
51
    {
52
        //nothing more to process here
53
    }
54
}
55