mirror of
https://github.com/rectorphp/rector.git
synced 2024-09-06 15:41:59 +00:00
53 lines
2.5 KiB
PHP
53 lines
2.5 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
// see https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata
|
|
namespace PHPSTORM_META;
|
|
|
|
// $container->get(Type::class) → instance of "Type"
|
|
override(\Psr\Container\ContainerInterface::get(0), type(0));
|
|
|
|
// $propertyPhpDocInfo->getByType(Type::class) → instance of "Type"|null - @todo how to make this nullable?
|
|
override(\Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo::getByType(0), type(0));
|
|
|
|
// PhpStorm 2019.1 - add argument autocomplete
|
|
// https://blog.jetbrains.com/phpstorm/2019/02/new-phpstorm-meta-php-features/
|
|
expectedArguments(
|
|
\PhpParser\Node::getAttribute(),
|
|
0,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::FILE_INFO,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NAME,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NAMESPACE_NAME,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NAMESPACE_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_EXPRESSION,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_EXPRESSION,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::USE_NODES,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::START_TOKEN_POSITION
|
|
);
|
|
|
|
expectedArguments(
|
|
\PhpParser\Node::setAttribute(),
|
|
0,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::FILE_INFO,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NAME,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NAMESPACE_NAME,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NAMESPACE_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_NODE,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_EXPRESSION,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_EXPRESSION,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::USE_NODES,
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::START_TOKEN_POSITION
|
|
);
|