From 53a48674dc8bdb34256b671aa8869295f0ab9f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Mo=CC=88ller?= Date: Mon, 16 Sep 2013 15:27:25 +0200 Subject: [PATCH 1/2] Add inline comments --- library/Zend/Form/Element/Collection.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/Zend/Form/Element/Collection.php b/library/Zend/Form/Element/Collection.php index 1bf20431736..52a3a8d8328 100644 --- a/library/Zend/Form/Element/Collection.php +++ b/library/Zend/Form/Element/Collection.php @@ -211,12 +211,14 @@ public function populateValues($data) if ($this->targetElement instanceof FieldsetInterface) { foreach ($this->byName as $name => $fieldset) { if (isset($data[$name])) { + /* @var $fieldset FieldsetInterface */ $fieldset->populateValues($data[$name]); unset($data[$name]); } } } else { foreach ($this->byName as $name => $element) { + /* @var $element ElementInterface */ $element->setAttribute('value', $data[$name]); unset($data[$name]); } From e246f925bf7514ec53dc82742b471762099444ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Mo=CC=88ller?= Date: Wed, 2 Oct 2013 09:46:38 +0200 Subject: [PATCH 2/2] Remove inline comment, add comment to class property --- library/Zend/Form/Element/Collection.php | 2 -- library/Zend/Form/Fieldset.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/library/Zend/Form/Element/Collection.php b/library/Zend/Form/Element/Collection.php index 52a3a8d8328..1bf20431736 100644 --- a/library/Zend/Form/Element/Collection.php +++ b/library/Zend/Form/Element/Collection.php @@ -211,14 +211,12 @@ public function populateValues($data) if ($this->targetElement instanceof FieldsetInterface) { foreach ($this->byName as $name => $fieldset) { if (isset($data[$name])) { - /* @var $fieldset FieldsetInterface */ $fieldset->populateValues($data[$name]); unset($data[$name]); } } } else { foreach ($this->byName as $name => $element) { - /* @var $element ElementInterface */ $element->setAttribute('value', $data[$name]); unset($data[$name]); } diff --git a/library/Zend/Form/Fieldset.php b/library/Zend/Form/Fieldset.php index 1133c5115ff..4a6bf5b495c 100644 --- a/library/Zend/Form/Fieldset.php +++ b/library/Zend/Form/Fieldset.php @@ -23,7 +23,7 @@ class Fieldset extends Element implements FieldsetInterface protected $factory; /** - * @var array + * @var ElementInterface[] */ protected $byName = array();