Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eeb9192

Browse filesBrowse files
committed
minor #21054 Fix @return statements to use $this or static when relevant (fabpot)
This PR was merged into the 2.7 branch. Discussion ---------- Fix @return statements to use $this or static when relevant | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20290 | License | MIT | Doc PR | n/a see #20290 Commits ------- 3c0693d fixed @return when returning this or static
2 parents 2e0b61e + 3c0693d commit eeb9192
Copy full SHA for eeb9192

File tree

96 files changed

+465
-467
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

96 files changed

+465
-467
lines changed

‎src/Symfony/Bridge/Twig/NodeVisitor/Scope.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/NodeVisitor/Scope.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(Scope $parent = null)
4242
/**
4343
* Opens a new child scope.
4444
*
45-
* @return Scope
45+
* @return self
4646
*/
4747
public function enter()
4848
{
@@ -52,7 +52,7 @@ public function enter()
5252
/**
5353
* Closes current scope and returns parent one.
5454
*
55-
* @return Scope|null
55+
* @return self|null
5656
*/
5757
public function leave()
5858
{
@@ -67,7 +67,7 @@ public function leave()
6767
* @param string $key
6868
* @param mixed $value
6969
*
70-
* @return Scope Current scope
70+
* @return $this
7171
*
7272
* @throws \LogicException
7373
*/

‎src/Symfony/Component/BrowserKit/Cookie.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/BrowserKit/Cookie.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function __toString()
121121
* @param string $cookie A Set-Cookie header value
122122
* @param string $url The base URL
123123
*
124-
* @return Cookie A Cookie instance
124+
* @return static
125125
*
126126
* @throws \InvalidArgumentException
127127
*/

‎src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php
+13-13Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function prototype($type)
8585
* If this function has been called and the node is not set during the finalization
8686
* phase, it's default value will be derived from its children default values.
8787
*
88-
* @return ArrayNodeDefinition
88+
* @return $this
8989
*/
9090
public function addDefaultsIfNotSet()
9191
{
@@ -101,7 +101,7 @@ public function addDefaultsIfNotSet()
101101
*
102102
* This method is applicable to prototype nodes only.
103103
*
104-
* @return ArrayNodeDefinition
104+
* @return $this
105105
*/
106106
public function addDefaultChildrenIfNoneSet($children = null)
107107
{
@@ -115,7 +115,7 @@ public function addDefaultChildrenIfNoneSet($children = null)
115115
*
116116
* This method is applicable to prototype nodes only.
117117
*
118-
* @return ArrayNodeDefinition
118+
* @return $this
119119
*/
120120
public function requiresAtLeastOneElement()
121121
{
@@ -129,7 +129,7 @@ public function requiresAtLeastOneElement()
129129
*
130130
* If used all keys have to be defined in the same configuration file.
131131
*
132-
* @return ArrayNodeDefinition
132+
* @return $this
133133
*/
134134
public function disallowNewKeysInSubsequentConfigs()
135135
{
@@ -144,7 +144,7 @@ public function disallowNewKeysInSubsequentConfigs()
144144
* @param string $singular The key to remap
145145
* @param string $plural The plural of the key for irregular plurals
146146
*
147-
* @return ArrayNodeDefinition
147+
* @return $this
148148
*/
149149
public function fixXmlConfig($singular, $plural = null)
150150
{
@@ -179,7 +179,7 @@ public function fixXmlConfig($singular, $plural = null)
179179
* @param string $name The name of the key
180180
* @param bool $removeKeyItem Whether or not the key item should be removed
181181
*
182-
* @return ArrayNodeDefinition
182+
* @return $this
183183
*/
184184
public function useAttributeAsKey($name, $removeKeyItem = true)
185185
{
@@ -194,7 +194,7 @@ public function useAttributeAsKey($name, $removeKeyItem = true)
194194
*
195195
* @param bool $allow
196196
*
197-
* @return ArrayNodeDefinition
197+
* @return $this
198198
*/
199199
public function canBeUnset($allow = true)
200200
{
@@ -216,7 +216,7 @@ public function canBeUnset($allow = true)
216216
* enableableArrayNode: {enabled: false, ...} # The config is disabled
217217
* enableableArrayNode: false # The config is disabled
218218
*
219-
* @return ArrayNodeDefinition
219+
* @return $this
220220
*/
221221
public function canBeEnabled()
222222
{
@@ -246,7 +246,7 @@ public function canBeEnabled()
246246
*
247247
* By default, the section is enabled.
248248
*
249-
* @return ArrayNodeDefinition
249+
* @return $this
250250
*/
251251
public function canBeDisabled()
252252
{
@@ -266,7 +266,7 @@ public function canBeDisabled()
266266
/**
267267
* Disables the deep merging of the node.
268268
*
269-
* @return ArrayNodeDefinition
269+
* @return $this
270270
*/
271271
public function performNoDeepMerging()
272272
{
@@ -284,7 +284,7 @@ public function performNoDeepMerging()
284284
* you want to send an entire configuration array through a special
285285
* tree that processes only part of the array.
286286
*
287-
* @return ArrayNodeDefinition
287+
* @return $this
288288
*/
289289
public function ignoreExtraKeys()
290290
{
@@ -298,7 +298,7 @@ public function ignoreExtraKeys()
298298
*
299299
* @param bool $bool Whether to enable key normalization
300300
*
301-
* @return ArrayNodeDefinition
301+
* @return $this
302302
*/
303303
public function normalizeKeys($bool)
304304
{
@@ -320,7 +320,7 @@ public function normalizeKeys($bool)
320320
*
321321
* @param NodeDefinition $node A NodeDefinition instance
322322
*
323-
* @return ArrayNodeDefinition This node
323+
* @return $this
324324
*/
325325
public function append(NodeDefinition $node)
326326
{

‎src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class EnumNodeDefinition extends ScalarNodeDefinition
2525
/**
2626
* @param array $values
2727
*
28-
* @return EnumNodeDefinition|$this
28+
* @return $this
2929
*/
3030
public function values(array $values)
3131
{

‎src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(NodeDefinition $node)
4040
*
4141
* @param \Closure $then
4242
*
43-
* @return ExprBuilder
43+
* @return $this
4444
*/
4545
public function always(\Closure $then = null)
4646
{
@@ -60,7 +60,7 @@ public function always(\Closure $then = null)
6060
*
6161
* @param \Closure $closure
6262
*
63-
* @return ExprBuilder
63+
* @return $this
6464
*/
6565
public function ifTrue(\Closure $closure = null)
6666
{
@@ -76,7 +76,7 @@ public function ifTrue(\Closure $closure = null)
7676
/**
7777
* Tests if the value is a string.
7878
*
79-
* @return ExprBuilder
79+
* @return $this
8080
*/
8181
public function ifString()
8282
{
@@ -88,7 +88,7 @@ public function ifString()
8888
/**
8989
* Tests if the value is null.
9090
*
91-
* @return ExprBuilder
91+
* @return $this
9292
*/
9393
public function ifNull()
9494
{
@@ -100,7 +100,7 @@ public function ifNull()
100100
/**
101101
* Tests if the value is an array.
102102
*
103-
* @return ExprBuilder
103+
* @return $this
104104
*/
105105
public function ifArray()
106106
{
@@ -114,7 +114,7 @@ public function ifArray()
114114
*
115115
* @param array $array
116116
*
117-
* @return ExprBuilder
117+
* @return $this
118118
*/
119119
public function ifInArray(array $array)
120120
{
@@ -128,7 +128,7 @@ public function ifInArray(array $array)
128128
*
129129
* @param array $array
130130
*
131-
* @return ExprBuilder
131+
* @return $this
132132
*/
133133
public function ifNotInArray(array $array)
134134
{
@@ -142,7 +142,7 @@ public function ifNotInArray(array $array)
142142
*
143143
* @param \Closure $closure
144144
*
145-
* @return ExprBuilder
145+
* @return $this
146146
*/
147147
public function then(\Closure $closure)
148148
{
@@ -154,7 +154,7 @@ public function then(\Closure $closure)
154154
/**
155155
* Sets a closure returning an empty array.
156156
*
157-
* @return ExprBuilder
157+
* @return $this
158158
*/
159159
public function thenEmptyArray()
160160
{
@@ -170,7 +170,7 @@ public function thenEmptyArray()
170170
*
171171
* @param string $message
172172
*
173-
* @return ExprBuilder
173+
* @return $this
174174
*
175175
* @throws \InvalidArgumentException
176176
*/
@@ -184,7 +184,7 @@ public function thenInvalid($message)
184184
/**
185185
* Sets a closure unsetting this key of the array at validation time.
186186
*
187-
* @return ExprBuilder
187+
* @return $this
188188
*
189189
* @throws UnsetKeyException
190190
*/

‎src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Builder/MergeBuilder.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(NodeDefinition $node)
3737
*
3838
* @param bool $allow
3939
*
40-
* @return MergeBuilder
40+
* @return $this
4141
*/
4242
public function allowUnset($allow = true)
4343
{
@@ -51,7 +51,7 @@ public function allowUnset($allow = true)
5151
*
5252
* @param bool $deny Whether the overwriting is forbidden or not
5353
*
54-
* @return MergeBuilder
54+
* @return $this
5555
*/
5656
public function denyOverwrite($deny = true)
5757
{

‎src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct()
4242
*
4343
* @param ParentNodeDefinitionInterface $parent The parent node
4444
*
45-
* @return NodeBuilder This node builder
45+
* @return $this
4646
*/
4747
public function setParent(ParentNodeDefinitionInterface $parent = null)
4848
{
@@ -182,7 +182,7 @@ public function node($name, $type)
182182
*
183183
* @param NodeDefinition $node
184184
*
185-
* @return NodeBuilder This node builder
185+
* @return $this
186186
*/
187187
public function append(NodeDefinition $node)
188188
{
@@ -207,7 +207,7 @@ public function append(NodeDefinition $node)
207207
* @param string $type The name of the type
208208
* @param string $class The fully qualified name the node definition class
209209
*
210-
* @return NodeBuilder This node builder
210+
* @return $this
211211
*/
212212
public function setNodeClass($type, $class)
213213
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.