Total Complexity | 4 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Coverage | 70% |
Changes | 0 |
1 | <?php |
||
18 | class Attribute |
||
19 | { |
||
20 | /** |
||
21 | * The name of the attribute |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $name; |
||
26 | |||
27 | /** |
||
28 | * The value of the attribute |
||
29 | * |
||
30 | * @var mixed |
||
31 | */ |
||
32 | protected $value; |
||
33 | |||
34 | /** |
||
35 | * Gets the name attribute |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 8 | public function getName() |
|
40 | { |
||
41 | 8 | return $this->name; |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Gets the value attribute |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | 8 | public function getValue() |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * Sets the value attribute |
||
56 | * |
||
57 | * @param mixed $value |
||
58 | * |
||
59 | * @return null |
||
60 | */ |
||
61 | public function setValue($value) |
||
62 | { |
||
63 | $this->value = $value; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Constructor |
||
68 | * |
||
69 | * @param string $name |
||
70 | * @param mixed $value |
||
71 | */ |
||
72 | 8 | public function __construct($name, $value = null) |
|
76 | 8 | } |
|
77 | } |
||
78 |