| Subject |
Details |
| Rector version |
0.6.4 |
| PHP version |
PHP 7.3 |
| Full Command |
rector process redaxo/src/core/lib --autoload-file phpstan-bootstrap.php |
Current Behaviour
analyzing this file
https://github.com/redaxo/redaxo/blob/master/redaxo/src/core/lib/util/socket/socket_response.php leads to
[ERROR] Could not process "C:\xampp7.3\htdocs\redaxo\redaxo\src\core\lib\util\socket\socket_response.php" file, due to:
"Rector\NodeTypeResolver\StaticTypeMapper::mapPHPStanTypeToDocString for PHPStan\Type\ResourceType".
I guess its related to a param typed as resource, see
/**
* Constructor.
*
* @param resource $stream Socket stream
*
* @throws InvalidArgumentException
*/
public function __construct($stream)
{
resource is a type which is used through the php.net manual etc, therefore should be known to rector?
using rector.yaml:
# rector.yaml
services:
Rector\TypeDeclaration\Rector\Property\PropertyTypeDeclarationRector: ~
rector process redaxo/src/core/lib --autoload-file phpstan-bootstrap.phpCurrent Behaviour
analyzing this file
https://github.com/redaxo/redaxo/blob/master/redaxo/src/core/lib/util/socket/socket_response.php leads to
I guess its related to a param typed as
resource, seeresource is a type which is used through the php.net manual etc, therefore should be known to rector?
using rector.yaml: