| @@ -1,5 +1,18 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * MultipleFormElementValue.php | |
| 4 | + * | |
| 5 | + * The MultipleFormElementValue class file. | |
| 6 | + * | |
| 7 | + * PHP versions 5 | |
| 8 | + * | |
| 9 | + * @author Alexander Schneider <alexanderschneider85@gmail.com> | |
| 10 | + * @copyright 2008-2017 Alexander Schneider | |
| 11 | + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 | |
| 12 | + * @version SVN: $id$ | |
| 13 | + * @link http://wordpress.org/extend/plugins/user-access-manager/ | |
| 14 | + */ | |
| 2 | 15 | |
| 3 | 16 | declare(strict_types=1); |
| 4 | 17 | |
| 5 | 18 | namespace UserAccessManager\Form; |
| @@ -5,16 +18,25 @@ | ||
| 5 | 18 | namespace UserAccessManager\Form; |
| 6 | 19 | |
| 7 | 20 | use Exception; |
| 8 | 21 | |
| 22 | +/** | |
| 23 | + * Class MultipleFormElementValue | |
| 24 | + * | |
| 25 | + * @package UserAccessManager\Form | |
| 26 | + */ | |
| 9 | 27 | class MultipleFormElementValue extends ValueSetFormElementValue |
| 10 | 28 | { |
| 11 | - private ?FormElement $subElement = null; | |
| 29 | + /** | |
| 30 | + * @var FormElement | |
| 31 | + */ | |
| 32 | + private $subElement; | |
| 12 | 33 | |
| 13 | 34 | /** |
| 35 | + * @param FormElement $subElement | |
| 14 | 36 | * @throws Exception |
| 15 | 37 | */ |
| 16 | - public function setSubElement(FormElement $subElement): void | |
| 38 | + public function setSubElement(FormElement $subElement) | |
| 17 | 39 | { |
| 18 | 40 | if ($subElement instanceof MultipleFormElement) { |
| 19 | 41 | throw new Exception('Invalid form type for sub element.'); |
| 20 | 42 | } |
| @@ -21,8 +43,11 @@ | ||
| 21 | 43 | |
| 22 | 44 | $this->subElement = $subElement; |
| 23 | 45 | } |
| 24 | 46 | |
| 47 | + /** | |
| 48 | + * @return FormElement|null | |
| 49 | + */ | |
| 25 | 50 | public function getSubElement(): ?FormElement |
| 26 | 51 | { |
| 27 | 52 | return $this->subElement; |
| 28 | 53 | } |