Completed
Pull Request — master (#8)
by Tobias
23:00 queued 14:46
created

GuiMessageRepresentation   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 54
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 4 1
A setKey() 0 6 1
A getMessage() 0 4 1
A setMessage() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\Bundle\Model;
13
14
use Symfony\Component\Validator\Constraints as Assert;
15
16
/**
17
 * @author Tobias Nyholm <[email protected]>
18
 */
19
class GuiMessageRepresentation
20
{
21
    /**
22
     * @var string
23
     * @Assert\NotBlank(groups={"Create", "Edit", "Delete"})
24
     */
25
    private $key;
26
27
    /**
28
     * @var string
29
     * @Assert\NotBlank(groups={"Create", "Edit"})
30
     */
31
    private $message;
32
33
    /**
34
     * @return string
35
     */
36
    public function getKey()
37
    {
38
        return $this->key;
39
    }
40
41
    /**
42
     * @param string $key
43
     *
44
     * @return GuiMessageRepresentation
45
     */
46
    public function setKey($key)
47
    {
48
        $this->key = $key;
49
50
        return $this;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getMessage()
57
    {
58
        return $this->message;
59
    }
60
61
    /**
62
     * @param string $message
63
     *
64
     * @return GuiMessageRepresentation
65
     */
66
    public function setMessage($message)
67
    {
68
        $this->message = $message;
69
70
        return $this;
71
    }
72
}
73