Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

@return self correction #6686

Closed
wants to merge 2 commits into from
Closed

@return self correction #6686

wants to merge 2 commits into from

Conversation

ThaDafinser
Copy link
Contributor

Different @return blocks, lead to different code completion currently.

At $form->add() i thought i get the current created fieldset returned, but i got return $this...so circular call ...

    /**
     * Add an element or fieldset
     *
     * If $elementOrFieldset is an array or Traversable, passes the argument on
     * to the composed factory to create the object before attaching it.
     *
     * $flags could contain metadata such as the alias under which to register
     * the element or fieldset, order in which to prioritize it, etc.
     *
     * @param  array|Traversable|ElementInterface $elementOrFieldset
     * @param  array                              $flags
     * @return \Zend\Form\Fieldset|\Zend\Form\FieldsetInterface|\Zend\Form\FormInterface
     */
    public function add($elementOrFieldset, array $flags = array())

weierophinney and others added 2 commits September 16, 2014 18:04
Different @return blocks, lead to different code completion currently.

At `$form->add()` i thought i get the current created fieldset returned, but i got the form...so circular call ...

    /**
     * Add an element or fieldset
     *
     * If $elementOrFieldset is an array or Traversable, passes the argument on
     * to the composed factory to create the object before attaching it.
     *
     * $flags could contain metadata such as the alias under which to register
     * the element or fieldset, order in which to prioritize it, etc.
     *
     * @param  array|Traversable|ElementInterface $elementOrFieldset
     * @param  array                              $flags
     * @return \Zend\Form\Fieldset|\Zend\Form\FieldsetInterface|\Zend\Form\FormInterface
     */
    public function add($elementOrFieldset, array $flags = array())
@malukenho
Copy link
Member

This PR needs to be rebased

@Ocramius Ocramius self-assigned this Nov 22, 2014
@Ocramius Ocramius added this to the 2.3.4 milestone Nov 22, 2014
@Ocramius Ocramius closed this in 8a5e42e Nov 22, 2014
Ocramius added a commit that referenced this pull request Nov 22, 2014
@Ocramius
Copy link
Member

@ThaDafinser merged!

master: 8a5e42e
develop: 0c328e3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants