Skip to content

Commit 6f1ee11

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: fixed @return when returning this or static override property constraints in child class [Console] improved code coverage of Command class Only count on arrays or countables to avoid warnings in PHP 7.2
2 parents 9851237 + dc65db4 commit 6f1ee11

File tree

12 files changed

+82
-47
lines changed

12 files changed

+82
-47
lines changed

Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ public function getTerminalDimensions()
775775
* @param int $width The width
776776
* @param int $height The height
777777
*
778-
* @return Application The current application
778+
* @return $this
779779
*/
780780
public function setTerminalDimensions($width, $height)
781781
{

Command/Command.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function run(InputInterface $input, OutputInterface $output)
268268
*
269269
* @param callable $code A callable(InputInterface $input, OutputInterface $output)
270270
*
271-
* @return Command The current instance
271+
* @return $this
272272
*
273273
* @throws InvalidArgumentException
274274
*
@@ -332,7 +332,7 @@ public function mergeApplicationDefinition($mergeArgs = true)
332332
*
333333
* @param array|InputDefinition $definition An array of argument and option instances or a definition instance
334334
*
335-
* @return Command The current instance
335+
* @return $this
336336
*/
337337
public function setDefinition($definition)
338338
{
@@ -380,7 +380,7 @@ public function getNativeDefinition()
380380
* @param string $description A description text
381381
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
382382
*
383-
* @return Command The current instance
383+
* @return $this
384384
*/
385385
public function addArgument($name, $mode = null, $description = '', $default = null)
386386
{
@@ -398,7 +398,7 @@ public function addArgument($name, $mode = null, $description = '', $default = n
398398
* @param string $description A description text
399399
* @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
400400
*
401-
* @return Command The current instance
401+
* @return $this
402402
*/
403403
public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null)
404404
{
@@ -417,7 +417,7 @@ public function addOption($name, $shortcut = null, $mode = null, $description =
417417
*
418418
* @param string $name The command name
419419
*
420-
* @return Command The current instance
420+
* @return $this
421421
*
422422
* @throws InvalidArgumentException When the name is invalid
423423
*/
@@ -440,7 +440,7 @@ public function setName($name)
440440
*
441441
* @param string $title The process title
442442
*
443-
* @return Command The current instance
443+
* @return $this
444444
*/
445445
public function setProcessTitle($title)
446446
{
@@ -464,7 +464,7 @@ public function getName()
464464
*
465465
* @param string $description The description for the command
466466
*
467-
* @return Command The current instance
467+
* @return $this
468468
*/
469469
public function setDescription($description)
470470
{
@@ -488,7 +488,7 @@ public function getDescription()
488488
*
489489
* @param string $help The help for the command
490490
*
491-
* @return Command The current instance
491+
* @return $this
492492
*/
493493
public function setHelp($help)
494494
{
@@ -534,7 +534,7 @@ public function getProcessedHelp()
534534
*
535535
* @param string[] $aliases An array of aliases for the command
536536
*
537-
* @return Command The current instance
537+
* @return $this
538538
*
539539
* @throws InvalidArgumentException When an alias is invalid
540540
*/
@@ -586,7 +586,7 @@ public function getSynopsis($short = false)
586586
*
587587
* @param string $usage The usage, it'll be prefixed with the command name
588588
*
589-
* @return Command The current instance
589+
* @return $this
590590
*/
591591
public function addUsage($usage)
592592
{

Formatter/OutputFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function getStyleStack()
208208
*
209209
* @param string $string
210210
*
211-
* @return OutputFormatterStyle|bool false if string is not format string
211+
* @return OutputFormatterStyle|false false if string is not format string
212212
*/
213213
private function createStyleFromString($string)
214214
{

Formatter/OutputFormatterStyleStack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getCurrent()
104104
/**
105105
* @param OutputFormatterStyleInterface $emptyStyle
106106
*
107-
* @return OutputFormatterStyleStack
107+
* @return $this
108108
*/
109109
public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)
110110
{

Helper/DescriptorHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function describe(OutputInterface $output, $object, array $options = arra
7878
* @param string $format
7979
* @param DescriptorInterface $descriptor
8080
*
81-
* @return DescriptorHelper
81+
* @return $this
8282
*/
8383
public function register($format, DescriptorInterface $descriptor)
8484
{

Helper/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function setHelperSet(HelperSet $helperSet = null)
3535
/**
3636
* Gets the helper set associated with this helper.
3737
*
38-
* @return HelperSet A HelperSet instance
38+
* @return HelperSet|null
3939
*/
4040
public function getHelperSet()
4141
{

Helper/Table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static function setStyleDefinition($name, TableStyle $style)
100100
*
101101
* @param string $name The style name
102102
*
103-
* @return TableStyle A TableStyle instance
103+
* @return TableStyle
104104
*/
105105
public static function getStyleDefinition($name)
106106
{
@@ -120,7 +120,7 @@ public static function getStyleDefinition($name)
120120
*
121121
* @param TableStyle|string $name The style name or a TableStyle instance
122122
*
123-
* @return Table
123+
* @return $this
124124
*/
125125
public function setStyle($name)
126126
{

Helper/TableHelper.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct($triggerDeprecationError = true)
4949
*
5050
* @param int $layout self::LAYOUT_*
5151
*
52-
* @return TableHelper
52+
* @return $this
5353
*
5454
* @throws InvalidArgumentException when the table layout is not known
5555
*/
@@ -115,7 +115,7 @@ public function setRow($column, array $row)
115115
*
116116
* @param string $paddingChar
117117
*
118-
* @return TableHelper
118+
* @return $this
119119
*/
120120
public function setPaddingChar($paddingChar)
121121
{
@@ -129,7 +129,7 @@ public function setPaddingChar($paddingChar)
129129
*
130130
* @param string $horizontalBorderChar
131131
*
132-
* @return TableHelper
132+
* @return $this
133133
*/
134134
public function setHorizontalBorderChar($horizontalBorderChar)
135135
{
@@ -143,7 +143,7 @@ public function setHorizontalBorderChar($horizontalBorderChar)
143143
*
144144
* @param string $verticalBorderChar
145145
*
146-
* @return TableHelper
146+
* @return $this
147147
*/
148148
public function setVerticalBorderChar($verticalBorderChar)
149149
{
@@ -157,7 +157,7 @@ public function setVerticalBorderChar($verticalBorderChar)
157157
*
158158
* @param string $crossingChar
159159
*
160-
* @return TableHelper
160+
* @return $this
161161
*/
162162
public function setCrossingChar($crossingChar)
163163
{
@@ -171,7 +171,7 @@ public function setCrossingChar($crossingChar)
171171
*
172172
* @param string $cellHeaderFormat
173173
*
174-
* @return TableHelper
174+
* @return $this
175175
*/
176176
public function setCellHeaderFormat($cellHeaderFormat)
177177
{
@@ -185,7 +185,7 @@ public function setCellHeaderFormat($cellHeaderFormat)
185185
*
186186
* @param string $cellRowFormat
187187
*
188-
* @return TableHelper
188+
* @return $this
189189
*/
190190
public function setCellRowFormat($cellRowFormat)
191191
{
@@ -199,7 +199,7 @@ public function setCellRowFormat($cellRowFormat)
199199
*
200200
* @param string $cellRowContentFormat
201201
*
202-
* @return TableHelper
202+
* @return $this
203203
*/
204204
public function setCellRowContentFormat($cellRowContentFormat)
205205
{
@@ -213,7 +213,7 @@ public function setCellRowContentFormat($cellRowContentFormat)
213213
*
214214
* @param string $borderFormat
215215
*
216-
* @return TableHelper
216+
* @return $this
217217
*/
218218
public function setBorderFormat($borderFormat)
219219
{
@@ -227,7 +227,7 @@ public function setBorderFormat($borderFormat)
227227
*
228228
* @param int $padType STR_PAD_*
229229
*
230-
* @return TableHelper
230+
* @return $this
231231
*/
232232
public function setPadType($padType)
233233
{

Helper/TableStyle.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class TableStyle
3737
*
3838
* @param string $paddingChar
3939
*
40-
* @return TableStyle
40+
* @return $this
4141
*/
4242
public function setPaddingChar($paddingChar)
4343
{
@@ -65,7 +65,7 @@ public function getPaddingChar()
6565
*
6666
* @param string $horizontalBorderChar
6767
*
68-
* @return TableStyle
68+
* @return $this
6969
*/
7070
public function setHorizontalBorderChar($horizontalBorderChar)
7171
{
@@ -89,7 +89,7 @@ public function getHorizontalBorderChar()
8989
*
9090
* @param string $verticalBorderChar
9191
*
92-
* @return TableStyle
92+
* @return $this
9393
*/
9494
public function setVerticalBorderChar($verticalBorderChar)
9595
{
@@ -113,7 +113,7 @@ public function getVerticalBorderChar()
113113
*
114114
* @param string $crossingChar
115115
*
116-
* @return TableStyle
116+
* @return $this
117117
*/
118118
public function setCrossingChar($crossingChar)
119119
{
@@ -137,7 +137,7 @@ public function getCrossingChar()
137137
*
138138
* @param string $cellHeaderFormat
139139
*
140-
* @return TableStyle
140+
* @return $this
141141
*/
142142
public function setCellHeaderFormat($cellHeaderFormat)
143143
{
@@ -161,7 +161,7 @@ public function getCellHeaderFormat()
161161
*
162162
* @param string $cellRowFormat
163163
*
164-
* @return TableStyle
164+
* @return $this
165165
*/
166166
public function setCellRowFormat($cellRowFormat)
167167
{
@@ -185,7 +185,7 @@ public function getCellRowFormat()
185185
*
186186
* @param string $cellRowContentFormat
187187
*
188-
* @return TableStyle
188+
* @return $this
189189
*/
190190
public function setCellRowContentFormat($cellRowContentFormat)
191191
{
@@ -209,7 +209,7 @@ public function getCellRowContentFormat()
209209
*
210210
* @param string $borderFormat
211211
*
212-
* @return TableStyle
212+
* @return $this
213213
*/
214214
public function setBorderFormat($borderFormat)
215215
{
@@ -233,7 +233,7 @@ public function getBorderFormat()
233233
*
234234
* @param int $padType STR_PAD_*
235235
*
236-
* @return TableStyle
236+
* @return $this
237237
*/
238238
public function setPadType($padType)
239239
{

Question/ChoiceQuestion.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getChoices()
5858
*
5959
* @param bool $multiselect
6060
*
61-
* @return ChoiceQuestion The current instance
61+
* @return $this
6262
*/
6363
public function setMultiselect($multiselect)
6464
{
@@ -93,7 +93,7 @@ public function getPrompt()
9393
*
9494
* @param string $prompt
9595
*
96-
* @return ChoiceQuestion The current instance
96+
* @return $this
9797
*/
9898
public function setPrompt($prompt)
9999
{
@@ -109,7 +109,7 @@ public function setPrompt($prompt)
109109
*
110110
* @param string $errorMessage
111111
*
112-
* @return ChoiceQuestion The current instance
112+
* @return $this
113113
*/
114114
public function setErrorMessage($errorMessage)
115115
{

0 commit comments

Comments
 (0)