| Total Complexity | 4 |
| Total Lines | 93 |
| Duplicated Lines | 0 % |
| Coverage | 63.64% |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class Message implements MessageInterface |
||
| 21 | { |
||
| 22 | use ORMBehaviors\Timestampable\Timestampable; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var int |
||
| 26 | * |
||
| 27 | * @ORM\Id |
||
| 28 | * @ORM\Column(type="integer") |
||
| 29 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 30 | */ |
||
| 31 | private $id; |
||
|
|
|||
| 32 | |||
| 33 | /** |
||
| 34 | * @var string |
||
| 35 | * |
||
| 36 | * @ORM\Column(type="string", length=255) |
||
| 37 | * @Assert\NotBlank() |
||
| 38 | */ |
||
| 39 | private $title; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var string |
||
| 43 | * |
||
| 44 | * @ORM\Column(type="text") |
||
| 45 | * @Assert\NotBlank() |
||
| 46 | */ |
||
| 47 | private $content; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @var TicketInterface |
||
| 51 | * |
||
| 52 | * @ORM\ManyToOne( |
||
| 53 | * targetEntity="Matks\Bundle\CustomerSupportBundle\Model\TicketInterface", |
||
| 54 | * inversedBy="messages" |
||
| 55 | * ) |
||
| 56 | * @Assert\Valid() |
||
| 57 | */ |
||
| 58 | private $ticket; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @var UserInterface |
||
| 62 | * |
||
| 63 | * @ORM\ManyToOne( |
||
| 64 | * targetEntity="Matks\Bundle\CustomerSupportBundle\Model\UserInterface", |
||
| 65 | * inversedBy="messages" |
||
| 66 | * ) |
||
| 67 | * @Assert\Valid() |
||
| 68 | */ |
||
| 69 | private $user; |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Constructor |
||
| 73 | * |
||
| 74 | * @param string $title |
||
| 75 | * @param UserInterface $user |
||
| 76 | * @param string $content |
||
| 77 | */ |
||
| 78 | 2 | public function __construct($title, UserInterface $user, $content) |
|
| 79 | { |
||
| 80 | 2 | $this->title = $title; |
|
| 81 | 2 | $this->user = $user; |
|
| 82 | 2 | $this->content = $content; |
|
| 83 | 2 | } |
|
| 84 | |||
| 85 | /** |
||
| 86 | * Get author |
||
| 87 | * |
||
| 88 | * @return UserInterface |
||
| 89 | */ |
||
| 90 | public function getAuthor() |
||
| 91 | { |
||
| 92 | return $this->user; |
||
| 93 | } |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Get title |
||
| 97 | * |
||
| 98 | * @return string |
||
| 99 | */ |
||
| 100 | 1 | public function getTitle() |
|
| 101 | { |
||
| 102 | 1 | return $this->title; |
|
| 103 | } |
||
| 104 | |||
| 105 | /** |
||
| 106 | * Get content |
||
| 107 | * |
||
| 108 | * @return string |
||
| 109 | */ |
||
| 110 | public function getContent() |
||
| 113 | } |
||
| 114 | |||
| 115 | } |
||
| 116 |