8000 minor #21137 Fixed `@return self` with `$this` in FormConfigBuilderIn… · symfony/symfony@0507d4a · GitHub
[go: up one dir, main page]

Skip to content

Commit 0507d4a

Browse files
minor #21137 Fixed @return self with $this in FormConfigBuilderInterface (wouterj)
This PR was merged into the 2.7 branch. Discussion ---------- Fixed `@return self` with `$this` in FormConfigBuilderInterface | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Fixes a tiny bug introduced by #21054 . `FormConfigBuilder` methods actually return `$this` and not `self`. This is important, as the `FormBuilder` (extending `FormConfigBuilder`) methods can also be called (e.g. `$builder->setDataMapper(...)->add()` is perfectly possible). Commits ------- 505e84d Fixed `@return self` with `$this`
2 parents 770ed8d + 505e84d commit 0507d4a

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

src/Symfony/Component/Form/FormConfigBuilderInterface.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
2828
* with a higher priority are called before
2929
* listeners with a lower priority.
3030
*
31-
* @return self The configuration object
31+
* @return $this The configuration object
3232
*/
3333
public function addEventListener($eventName, $listener, $priority = 0);
3434

@@ -37,7 +37,7 @@ public function addEventListener($eventName, $listener, $priority = 0);
3737
*
3838
* @param EventSubscriberInterface $subscriber The subscriber to attach
3939
*
40-
* @return self The configuration object
40+
* @return $this The configuration object
4141
*/
4242
public function addEventSubscriber(EventSubscriberInterface $subscriber);
4343

@@ -52,14 +52,14 @@ public function addEventSubscriber(EventSubscriberInterface $subscriber);
5252
* @param DataTransformerInterface $viewTransformer
5353
* @param bool $forcePrepend if set to true, prepend instead of appending
5454
*
55-
* @return self The configuration object
55+
* @return $this The configuration object
5656
*/
5757
public function addViewTransformer(DataTransformerInterface $viewTransformer, $forcePrepend = false);
5858

5959
/**
6060
* Clears the view transformers.
6161
*
62-
* @return self The configuration object
62+
* @return $this The configuration object
6363
*/
6464
public function resetViewTransformers();
6565

@@ -74,14 +74,14 @@ public function resetViewTransformers();
7474
* @param DataTransformerInterface $modelTransformer
7575
* @param bool $forceAppend if set to true, append instead of prepending
7676
*
77-
* @return self The configuration object
77+
* @return $this The configuration object
7878
*/
7979
public function addModelTransformer(DataTransformerInterface $modelTransformer, $forceAppend = false);
8080

8181
/**
8282
* Clears the normalization transformers.
8383
*
84-
* @return self The configuration object
84+
* @return $this The configuration object
8585
*/
8686
public function resetModelTransformers();
8787

@@ -91,7 +91,7 @@ public function resetModelTransformers();
9191
* @param string $name The name of the attribute
9292
* @param mixed $value The value of the attribute
9393
*
94-
* @return self The configuration object
94+
* @return $this The configuration object
9595
*/
9696
public function setAttribute($name, $value);
9797

@@ -100,7 +100,7 @@ public function setAttribute($name, $value);
100100
*
101101
* @param array $attributes The attributes
102102
*
103-
* @return self The configuration object
103+
* @return $this The configuration object
104104
*/
105105
public function setAttributes(array $attributes);
106106

@@ -109,7 +109,7 @@ public function setAttributes(array $attributes);
109109
*
110110
* @param DataMapperInterface $dataMapper
111111
*
112-
* @return self The configuration object
112+
* @return $this The configuration object
113113
*/
114114
public function setDataMapper(DataMapperInterface $dataMapper = null);
115115

@@ -118,7 +118,7 @@ public function setDataMapper(DataMapperInterface $dataMapper = null);
118118
*
119119
* @param bool $disabled Whether the form is disabled
120120
*
121-
* @return self The configuration object
121+
* @return $this The configuration object
122122
*/
123123
public function setDisabled($disabled);
124124

@@ -127,7 +127,7 @@ public function setDisabled($disabled);
127127
*
128128
* @param mixed $emptyData The empty data
129129
*
130-
* @return self The configuration object
130+
* @return $this The configuration object
131131
*/
132132
public function setEmptyData($emptyData);
133133

@@ -136,7 +136,7 @@ public function setEmptyData($emptyData);
136136
*
137137
* @param bool $errorBubbling
138138
*
139-
* @return self The configuration object
139+
* @return $this The configuration object
140140
*/
141141
public function setErrorBubbling($errorBubbling);
142142

@@ -145,7 +145,7 @@ public function setErrorBubbling($errorBubbling);
145145
*
146146
* @param bool $required
147147
*
148-
* @return self The configuration object
148+
* @return $this The configuration object
149149
*/
150150
public function setRequired($required);
151151

@@ -156,7 +156,7 @@ public function setRequired($required);
156156
* The property path or null if the path should be set
157157
* automatically based on the form's name.
158158
*
159-
* @return self The configuration object
159+
* @return $this The configuration object
160160
*/
161161
public function setPropertyPath($propertyPath);
162162

@@ -166,7 +166,7 @@ public function setPropertyPath($propertyPath);
166166
*
167167
* @param bool $mapped Whether the form should be mapped
168168
*
169-
* @return self The configuration object
169+
* @return $this The configuration object
170170
*/
171171
public function setMapped($mapped);
172172

@@ -176,7 +176,7 @@ public function setMapped($mapped);
176176
* @param bool $byReference Whether the data should be
177177
* modified by reference.
178178
*
179-
* @return self The configuration object
179+
* @return $this The configuration object
180180
*/
181181
public function setByReference($byReference);
182182

@@ -185,7 +185,7 @@ public function setByReference($byReference);
185185
*
186186
* @param bool $inheritData Whether the form should inherit its parent's data
187187
*
188-
* @return self The configuration object
188+
* @return $this The configuration object
189189
*/
190190
public function setInheritData($inheritData);
191191

@@ -194,7 +194,7 @@ public function setInheritData($inheritData);
194194
*
195195
* @param bool $compound Whether the form should be compound
196196
*
197-
* @return self The configuration object
197+
* @return $this The configuration object
198198
*
199199
* @see FormConfigInterface::getCompound()
200200
*/
@@ -205,7 +205,7 @@ public function setCompound($compound);
205205
*
206206
* @param ResolvedFormTypeInterface $type The type of the form
207207
*
208-
* @return self The configuration object
208+
* @return $this The configuration object
209209
*/
210210
public function setType(ResolvedFormTypeInterface $type);
211211

@@ -214,7 +214,7 @@ public function setType(ResolvedFormTypeInterface $type);
214214
*
215215
* @param mixed $data The data of the form in application format
216216
*
217-
* @return self The configuration object
217+
* @return $this The configuration object
218218
*/
219219
public function setData($data);
220220

@@ -227,7 +227,7 @@ public function setData($data);
227227
*
228228
* @param bool $locked Whether to lock the default data
229229
*
230-
* @return self The configuration object
230+
* @return $this The configuration object
231231
*/
232232
public function setDataLocked($locked);
233233

@@ -243,7 +243,7 @@ public function setFormFactory(FormFactoryInterface $formFactory);
243243
*
244244
* @param string $action The target URL of the form
245245
*
246-
* @return self The configuration object
246+
* @return $this The configuration object
247247
*/
248248
public function setAction($action);
249249

@@ -252,7 +252,7 @@ public function setAction($action);
252252
*
253253
* @param string $method The HTTP method of the form
254254
*
255-
* @return self The configuration object
255+
* @return $this The configuration object
256256
*/
257257
public function setMethod($method);
258258

@@ -261,7 +261,7 @@ public function setMethod($method);
261261
*
262262
* @param RequestHandlerInterface $requestHandler
263263
*
264-
* @return self The configuration object
264+
* @return $this The configuration object
265265
*/
266266
public function setRequestHandler(RequestHandlerInterface $requestHandler);
267267

@@ -275,7 +275,7 @@ public function setRequestHandler(RequestHandlerInterface $requestHandler);
275275
* In the second case, you need to call
276276 * {@link FormInterface::initialize()} manually.
277277
*
278-
* @return self The configuration object
278+
* @return $this The configuration object
279279
*/
280280
public function setAutoInitialize($initialize);
281281

0 commit comments

Comments
 (0)
0