| Subject |
Details |
| PHP version |
the one in docker image |
| Full Command |
docker run --rm -it -v $(pwd):/project rector/rector:latest process /project --config /project/rector.yaml --autoload-file /project/vendor/autoload.php -vvv |
Current Behaviour
@@ -221,7 +221,7 @@
*
* @return mixed A string representing the line or null if beginning of file is reached
*/
- protected function readLineFromFile($file)
+ protected function readLineFromFile(resource $file)
With Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector:
Minimal PHP Code Causing Issue
/**
* @param resource $file The file resource, with the pointer placed at the end of the line to read
*/
protected function readLineFromFile($file)
{
}
Expected Behaviour
No fix.
Although it might be tricky as the following is valid php code
class resource {}
function test(resource $test) {}
test(new resource);
Current Behaviour
With
Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector:Minimal PHP Code Causing Issue
Expected Behaviour
No fix.
Although it might be tricky as the following is valid php code