Commit c613d80
committed
minor #18596 [Console] Corrected return type of anonymous functions (mwansinck)
This PR was merged into the 6.2 branch.
Discussion
----------
[Console] Corrected return type of anonymous functions
Fixes wrong return type (void) for anonymous functions clearly returning a string value
When copying the current example from the docs it results in the following error;
```
Symfony\Component\ErrorHandler\Error\FatalError {#506
#message: "Compile Error: A void function must not return a value"
#code: 0
#file: "./src/Command/ExampleCommand.php"
#line: 58
-error: array:4 [
"type" => 64
"message" => "A void function must not return a value"
"file" => "../src/Command/Debug/OverrideUserCommand.php"
"line" => 58
]
}
```
Commits
-------
d2e78f1 Corrected return type of anonymous functions1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
0 commit comments