| @@ -26,23 +26,44 @@ | ||
| 26 | 26 | { |
| 27 | 27 | use ValueTrait; |
| 28 | 28 | use LabelTrait; |
| 29 | 29 | |
| 30 | - public function __construct( | |
| 31 | - protected string $id, | |
| 32 | - mixed $value = null, | |
| 33 | - ?string $label = null, | |
| 34 | - protected ?string $description = null | |
| 35 | - ) { | |
| 30 | + /** | |
| 31 | + * @var string | |
| 32 | + */ | |
| 33 | + protected $id; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * @var string | |
| 37 | + */ | |
| 38 | + protected $description; | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * FormElement constructor. | |
| 42 | + * @param string $id | |
| 43 | + * @param mixed|null $value | |
| 44 | + * @param string|null $label | |
| 45 | + * @param string|null $description | |
| 46 | + */ | |
| 47 | + public function __construct(string $id, $value = null, $label = null, $description = null) | |
| 48 | + { | |
| 49 | + $this->id = $id; | |
| 36 | 50 | $this->value = $value; |
| 37 | 51 | $this->label = $label; |
| 52 | + $this->description = $description; | |
| 38 | 53 | } |
| 39 | 54 | |
| 55 | + /** | |
| 56 | + * @return string | |
| 57 | + */ | |
| 40 | 58 | public function getId(): string |
| 41 | 59 | { |
| 42 | 60 | return $this->id; |
| 43 | 61 | } |
| 44 | 62 | |
| 63 | + /** | |
| 64 | + * @return null|string | |
| 65 | + */ | |
| 45 | 66 | public function getDescription(): ?string |
| 46 | 67 | { |
| 47 | 68 | return $this->description; |
| 48 | 69 | } |