From bc30ac9a5a0750a453f2767988f0e783249f711e Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 3 Jan 2022 13:48:14 +0100 Subject: [PATCH] Type property parameters via phpdoc And update the property constructor to better reflect that the $parameters are an array of values, not instances of the parameter class. Signed-off-by: Christoph Wurst --- lib/Property.php | 6 +++--- lib/Property/Uri.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Property.php b/lib/Property.php index 50cda9684..7a3416b11 100644 --- a/lib/Property.php +++ b/lib/Property.php @@ -37,7 +37,7 @@ abstract class Property extends Node /** * List of parameters. * - * @var array + * @var Parameter[] */ public $parameters = []; @@ -64,7 +64,7 @@ abstract class Property extends Node * @param Component $root The root document * @param string $name * @param string|array|null $value - * @param array $parameters List of parameters + * @param array $parameters List of parameter values * @param string $group The vcard property group */ public function __construct(Component $root, $name, $value = null, array $parameters = [], $group = null) @@ -178,7 +178,7 @@ public function add($name, $value = null) /** * Returns an iterable list of children. * - * @return array + * @return Parameter[] */ public function parameters() { diff --git a/lib/Property/Uri.php b/lib/Property/Uri.php index 1ad1fb199..6995dcd0f 100644 --- a/lib/Property/Uri.php +++ b/lib/Property/Uri.php @@ -40,7 +40,7 @@ public function getValueType() /** * Returns an iterable list of children. * - * @return array + * @return Parameter[] */ public function parameters() {