| Total Complexity | 6 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class Attribute implements AttributeInterface |
||
| 21 | { |
||
| 22 | /** @var string */ |
||
| 23 | protected $id; |
||
| 24 | |||
| 25 | /** @var string */ |
||
| 26 | protected $value; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function __toString() |
||
| 32 | { |
||
| 33 | return "$this->id=\"$this->value\""; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Attribute constructor. |
||
| 38 | * |
||
| 39 | * @param string $id |
||
| 40 | * @param string $value |
||
| 41 | */ |
||
| 42 | public function __construct(string $id, string $value) |
||
| 43 | { |
||
| 44 | $this->id = $id; |
||
| 45 | $this->value = $value; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get id. |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getId(): string |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Set id. |
||
| 60 | * |
||
| 61 | * @param string $id |
||
| 62 | */ |
||
| 63 | public function setId(string $id): void |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Get value. |
||
| 70 | * |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | public function getValue(): string |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Set value. |
||
| 80 | * |
||
| 81 | * @param string $value |
||
| 82 | */ |
||
| 83 | public function setValue(string $value): void |
||
| 86 | } |
||
| 87 | } |
||
| 88 |