-
-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
rectorphp/rector-src
#3471Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | 0.15.20 |
given code
<?php
final class DemoFile
{
public function run()
{
$range = static function ($start, $end) {
return array_map(static function ($number) {
return sprintf('%02d', $number);
}, range($start, $end));
};
}
}is turned into
https://phpstan.org/r/d11bf4fe-eebc-4ce6-97ec-78e4be083e01
by ReturnTypeFromStrictTypedCallRector.
Minimal PHP Code Causing Issue
https://getrector.com/demo/11e15340-e07c-4223-a1e7-892c34797dde
Expected Behaviour
rector should not produce "invalid"/unnecessary code/types
Reactions are currently unavailable