2019-10-13 07:59:52 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2019-02-02 01:33:39 +01:00
|
|
|
|
|
|
|
// see https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata
|
|
|
|
namespace PHPSTORM_META;
|
|
|
|
|
|
|
|
// $container->get(Type::class) → instance of "Type"
|
2021-04-06 19:33:09 +02:00
|
|
|
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
|
|
|
|
2019-02-02 01:33:39 +01:00
|
|
|
override(\Psr\Container\ContainerInterface::get(0), type(0));
|
2019-03-31 19:06:53 +02:00
|
|
|
|
2021-04-06 19:33:09 +02:00
|
|
|
expectedArguments(
|
|
|
|
\PHPStan\PhpDocParser\Ast\Node::getAttribute(),
|
|
|
|
0,
|
|
|
|
PhpDocAttributeKey::START_AND_END,
|
2021-04-06 20:36:50 +02:00
|
|
|
PhpDocAttributeKey::LAST_PHP_DOC_TOKEN_POSITION,
|
2021-04-06 19:33:09 +02:00
|
|
|
PhpDocAttributeKey::PARENT,
|
|
|
|
);
|
|
|
|
|
|
|
|
expectedArguments(
|
|
|
|
\PHPStan\PhpDocParser\Ast\Node::setAttribute(),
|
|
|
|
0,
|
|
|
|
PhpDocAttributeKey::START_AND_END,
|
2021-04-06 20:36:50 +02:00
|
|
|
PhpDocAttributeKey::LAST_PHP_DOC_TOKEN_POSITION,
|
2021-04-06 19:33:09 +02:00
|
|
|
PhpDocAttributeKey::PARENT,
|
|
|
|
);
|
|
|
|
|
|
|
|
expectedArguments(
|
|
|
|
\PHPStan\PhpDocParser\Ast\Node::hasAttribute(),
|
|
|
|
0,
|
|
|
|
PhpDocAttributeKey::START_AND_END,
|
2021-04-06 20:36:50 +02:00
|
|
|
PhpDocAttributeKey::LAST_PHP_DOC_TOKEN_POSITION,
|
2021-04-06 19:33:09 +02:00
|
|
|
PhpDocAttributeKey::PARENT,
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2019-03-31 19:06:53 +02:00
|
|
|
// PhpStorm 2019.1 - add argument autocomplete
|
|
|
|
// https://blog.jetbrains.com/phpstorm/2019/02/new-phpstorm-meta-php-features/
|
|
|
|
expectedArguments(
|
|
|
|
\PhpParser\Node::getAttribute(),
|
|
|
|
0,
|
2019-04-13 11:20:27 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_NODE,
|
2019-10-27 17:50:26 +01:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_STATEMENT,
|
2019-04-13 11:20:27 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::USE_NODES,
|
2019-09-25 18:11:05 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::START_TOKEN_POSITION,
|
2019-10-02 22:13:37 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::ORIGINAL_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::IS_UNREACHABLE,
|
2020-01-29 14:36:09 +01:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PHP_DOC_INFO,
|
2020-02-01 17:04:38 +01:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::KIND,
|
2020-04-25 16:41:02 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::IS_REGULAR_PATTERN,
|
2020-05-13 22:43:48 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::ORIGINAL_NAME,
|
2020-05-25 17:00:27 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::COMMENTS,
|
2020-06-19 01:35:11 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::VIRTUAL_NODE,
|
2020-08-11 12:59:04 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PARAMETER_POSITION,
|
2020-10-10 19:42:43 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::ARGUMENT_POSITION,
|
2019-03-31 19:06:53 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
expectedArguments(
|
|
|
|
\PhpParser\Node::setAttribute(),
|
|
|
|
0,
|
2019-04-13 11:20:27 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::METHOD_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_NODE,
|
2019-10-27 17:50:26 +01:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_STATEMENT,
|
2019-04-13 11:20:27 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::USE_NODES,
|
2019-10-02 22:13:37 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::START_TOKEN_POSITION,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::ORIGINAL_NODE,
|
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::IS_UNREACHABLE,
|
2020-01-29 14:36:09 +01:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PHP_DOC_INFO,
|
2020-02-01 17:04:38 +01:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::KIND,
|
2020-04-25 16:41:02 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::IS_REGULAR_PATTERN,
|
2020-05-13 22:43:48 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::ORIGINAL_NAME,
|
2020-05-25 17:00:27 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::COMMENTS,
|
2020-06-19 01:35:11 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::VIRTUAL_NODE,
|
2020-08-11 12:59:04 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::PARAMETER_POSITION,
|
2020-10-10 19:42:43 +02:00
|
|
|
\Rector\NodeTypeResolver\Node\AttributeKey::ARGUMENT_POSITION,
|
2019-03-31 19:06:53 +02:00
|
|
|
);
|
2020-03-24 23:49:19 +01:00
|
|
|
|
|
|
|
expectedArguments(
|
|
|
|
\Rector\Core\Rector\AbstractRector::isAtLeastPhpVersion(),
|
|
|
|
0,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::DIR_CONSTANT,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::ELVIS_OPERATOR,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::CLASSNAME_CONSTANT,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::EXP_OPERATOR,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::SCALAR_TYPES,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::NULL_COALESCE,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::SPACESHIP,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::DIRNAME_LEVELS,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::CSPRNG_FUNCTIONS,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::THROWABLE_TYPE,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::ITERABLE_TYPE,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::VOID_TYPE,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::CONSTANT_VISIBILITY,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::ARRAY_DESTRUCT,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::MULTI_EXCEPTION_CATCH,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::OBJECT_TYPE,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::IS_COUNTABLE,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::ARRAY_KEY_FIRST_LAST,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::JSON_EXCEPTION,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::SETCOOKIE_ACCEPT_ARRAY_OPTIONS,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::ARROW_FUNCTION,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::LITERAL_SEPARATOR,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::NULL_COALESCE_ASSIGN,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::TYPED_PROPERTIES,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::COVARIANT_RETURN,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::ARRAY_SPREAD,
|
|
|
|
\Rector\Core\ValueObject\PhpVersionFeature::UNION_TYPES,
|
|
|
|
);
|