Completed
Pull Request — master (#14)
by Matthieu
38:40
created

NotificationAttachment   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 59
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getAttachment() 0 4 1
A getId() 0 4 1
A getNotification() 0 4 1
A setAttachment() 0 4 1
1
<?php
2
3
namespace Yokai\MessengerBundle\Entity;
4
5
/**
6
 * Notification Attachment Doctrine ORM entity
7
 */
8
class NotificationAttachment
9
{
10
    /**
11
     * @var int
12
     */
13
    private $id;
14
15
    /**
16
     * @var Notification
17
     */
18
    private $notification;
19
20
    /**
21
     * @var string
22
     */
23
    private $attachment;
24
25
    /**
26
     * @param Notification $notification
27
     * @param string       $attachment
28
     */
29
    public function __construct(Notification $notification, $attachment)
30
    {
31
        $this->attachment = $attachment;
32
        $this->notification = $notification;
33
    }
34
35
    /**
36
     * @return mixed
37
     */
38
    public function getAttachment()
39
    {
40
        return $this->attachment;
41
    }
42
43
    /**
44
     * @return int
45
     */
46
    public function getId()
47
    {
48
        return $this->id;
49
    }
50
51
    /**
52
     * @return Notification
53
     */
54
    public function getNotification()
55
    {
56
        return $this->notification;
57
    }
58
59
    /**
60
     * @param string $attachment
61
     */
62
    public function setAttachment($attachment)
63
    {
64
        $this->attachment = $attachment;
65
    }
66
}
67