Skip to content

Commit 3183f1f

Browse files
committed
minor #23101 [FormBuilderInterface] Fixed PHPdoc return references (Javan Eskander)
This PR was merged into the 2.7 branch. Discussion ---------- [FormBuilderInterface] Fixed PHPdoc return references | Q | A | ------------- | --- | Branch? | 2.7 and higher | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | N/A (phpdoc) | License | MIT In a case where the method `createFormBuilder()` was used where the methods `add()` and `getForm()` were chained onto it, the final resulting object was no longer a FormBuilder object as the `add()` and `remove()` methods was using a return variable that didn't work. Should reference `self` as interfaces do not have a `$this` object. Commits ------- 2f350d1d38 Fixed PHPdoc return references in FormBuilderInterface
2 parents 6ffa4f0 + 952c882 commit 3183f1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FormBuilderInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
2727
* @param string|FormTypeInterface $type
2828
* @param array $options
2929
*
30-
* @return $this
30+
* @return self
3131
*/
3232
public function add($child, $type = null, array $options = array());
3333

@@ -58,7 +58,7 @@ public function get($name);
5858
*
5959
* @param string $name
6060
*
61-
* @return $this
61+
* @return self
6262
*/
6363
public function remove($name);
6464

0 commit comments

Comments
 (0)