| @@ -1,29 +1,50 @@ | ||
| 1 | 1 | <?php |
| 2 | - | |
| 3 | -declare(strict_types=1); | |
| 4 | - | |
| 2 | +/** | |
| 3 | + * MultipleFormElementValue.php | |
| 4 | + * | |
| 5 | + * The MultipleFormElementValue class file. | |
| 6 | + * | |
| 7 | + * PHP versions 5 | |
| 8 | + * | |
| 9 | + * @author Alexander Schneider <[email protected]> | |
| 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 | + */ | |
| 5 | 15 | namespace UserAccessManager\Form; |
| 6 | 16 | |
| 7 | -use Exception; | |
| 8 | - | |
| 17 | +/** | |
| 18 | + * Class MultipleFormElementValue | |
| 19 | + * | |
| 20 | + * @package UserAccessManager\Form | |
| 21 | + */ | |
| 9 | 22 | class MultipleFormElementValue extends ValueSetFormElementValue |
| 10 | 23 | { |
| 11 | - private ?FormElement $subElement = null; | |
| 24 | + /** | |
| 25 | + * @var FormElement | |
| 26 | + */ | |
| 27 | + private $subElement; | |
| 12 | 28 | |
| 13 | 29 | /** |
| 14 | - * @throws Exception | |
| 30 | + * @param FormElement $subElement | |
| 31 | + * | |
| 32 | + * @throws \Exception | |
| 15 | 33 | */ |
| 16 | - public function setSubElement(FormElement $subElement): void | |
| 34 | + public function setSubElement(FormElement $subElement) | |
| 17 | 35 | { |
| 18 | 36 | if ($subElement instanceof MultipleFormElement) { |
| 19 | - throw new Exception('Invalid form type for sub element.'); | |
| 37 | + throw new \Exception('Invalid form type for sub element.'); | |
| 20 | 38 | } |
| 21 | 39 | |
| 22 | 40 | $this->subElement = $subElement; |
| 23 | 41 | } |
| 24 | 42 | |
| 25 | - public function getSubElement(): ?FormElement | |
| 43 | + /** | |
| 44 | + * @return FormElement | |
| 45 | + */ | |
| 46 | + public function getSubElement() | |
| 26 | 47 | { |
| 27 | 48 | return $this->subElement; |
| 28 | 49 | } |
| 29 | 50 | } |