[Symfony] Add ConsoleExecuteReturnIntRector#2132
[Symfony] Add ConsoleExecuteReturnIntRector#2132TomasVotruba merged 5 commits intorectorphp:masterfrom
Conversation
|
Do you plan to handle no E.g. public function execute($input, $output)
{
$output->write('hi');
+ return 0;
} |
|
That should already be covered. |
|
Related Symfony PR: symfony/symfony#33775 |
|
Btw, only numeric values are converted to int: It seems like anything else will return -return 'hey';
+return 0;-return '13';
+return 13; |
|
So what do you suggest? - return $this->doSomething();
+ $result = $this->doSomething();
+ is_numeric($result) ? return (int) $result : return 0; |
|
I suggest to change the value only if know what is returned, but that's just an detail. But moreover, we should merge this PR as it is now, as there is lot of opened work. So next step is just small iteration |
|
Could you just make CI pass? It's ready then |
|
👍 |
|
Few moments I saw if fail, probably miss click. |
Fixes: #2119