2019-10-13 05:59:52 +00:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2022-06-06 17:12:56 +00:00
|
|
|
namespace Rector\NodeTypeResolver\Node;
|
2018-08-10 11:30:41 +00:00
|
|
|
|
2023-05-22 14:09:12 +00:00
|
|
|
use PHPStan\Analyser\Scope;
|
2021-11-05 23:24:22 +00:00
|
|
|
/**
|
|
|
|
* @enum
|
|
|
|
*/
|
2019-04-13 09:20:27 +00:00
|
|
|
final class AttributeKey
|
2018-08-10 11:30:41 +00:00
|
|
|
{
|
2022-05-31 21:16:09 +00:00
|
|
|
/**
|
|
|
|
* Internal php-parser key for String_, LNumber and DNumber nodes to hold original value (with "_" separators etc.)
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const RAW_VALUE = 'rawValue';
|
2020-06-18 23:35:11 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const VIRTUAL_NODE = 'virtual_node';
|
2018-08-14 09:35:18 +00:00
|
|
|
/**
|
2023-05-22 14:09:12 +00:00
|
|
|
* Contains @see Scope
|
2018-08-14 09:35:18 +00:00
|
|
|
* @var string
|
|
|
|
*/
|
2021-04-13 00:12:48 +00:00
|
|
|
public const SCOPE = 'scope';
|
2018-08-14 09:35:18 +00:00
|
|
|
/**
|
|
|
|
* Internal php-parser name.
|
|
|
|
* Do not change this even if you want!
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const ORIGINAL_NODE = 'origNode';
|
2020-05-25 15:00:27 +00:00
|
|
|
/**
|
|
|
|
* Internal php-parser name.
|
|
|
|
* Do not change this even if you want!
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const COMMENTS = 'comments';
|
2020-05-13 20:43:48 +00:00
|
|
|
/**
|
|
|
|
* Internal php-parser name.
|
|
|
|
* Do not change this even if you want!
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const ORIGINAL_NAME = 'originalName';
|
2018-08-14 09:35:18 +00:00
|
|
|
/**
|
2023-05-22 10:21:31 +00:00
|
|
|
* @deprecated Refactor to a custom visitors/parent node instead,
|
|
|
|
* @see https://phpstan.org/blog/preprocessing-ast-for-custom-rules
|
|
|
|
*
|
2020-08-07 09:30:05 +00:00
|
|
|
* @internal of php-parser, do not change
|
|
|
|
* @see https://github.com/nikic/PHP-Parser/pull/681/files
|
2018-08-14 09:35:18 +00:00
|
|
|
* @var string
|
2023-07-09 18:49:55 +00:00
|
|
|
*
|
|
|
|
* @api for BC layer
|
|
|
|
*
|
|
|
|
* The parent node can be still enabled by using custom PHPStan configuration,
|
|
|
|
* @see https://github.com/rectorphp/rector-src/pull/4458#discussion_r1257478146
|
2023-08-24 07:18:13 +00:00
|
|
|
* @see https://github.com/rectorphp/rector-src/pull/4841
|
2018-08-14 09:35:18 +00:00
|
|
|
*/
|
2020-08-07 09:30:05 +00:00
|
|
|
public const PARENT_NODE = 'parent';
|
2020-10-04 22:19:25 +00:00
|
|
|
/**
|
|
|
|
* Internal php-parser name.
|
|
|
|
* Do not change this even if you want!
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const NAMESPACED_NAME = 'namespacedName';
|
2019-02-17 12:50:24 +00:00
|
|
|
/**
|
2022-06-30 13:57:27 +00:00
|
|
|
* @api
|
|
|
|
*
|
2020-03-28 23:06:05 +00:00
|
|
|
* Internal php-parser name.
|
|
|
|
* Do not change this even if you want!
|
2020-10-31 12:59:40 +00:00
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const DOC_INDENTATION = 'docIndentation';
|
2019-02-27 11:21:06 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* Use often in php-parser
|
|
|
|
*/
|
|
|
|
public const KIND = 'kind';
|
2019-10-02 20:13:37 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
2020-03-28 23:06:05 +00:00
|
|
|
public const IS_UNREACHABLE = 'isUnreachable';
|
2020-01-29 13:36:09 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
2021-04-13 00:12:48 +00:00
|
|
|
public const PHP_DOC_INFO = 'php_doc_info';
|
2020-04-25 14:41:02 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_REGULAR_PATTERN = 'is_regular_pattern';
|
2020-04-29 21:06:38 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const DO_NOT_CHANGE = 'do_not_change';
|
2020-08-11 10:59:04 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const PARAMETER_POSITION = 'parameter_position';
|
2020-10-10 17:42:43 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const ARGUMENT_POSITION = 'argument_position';
|
2020-12-05 21:40:10 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const FUNC_ARGS_TRAILING_COMMA = 'trailing_comma';
|
2021-05-16 18:32:58 +00:00
|
|
|
/**
|
|
|
|
* Helps with infinite loop detection
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const CREATED_BY_RULE = 'created_by_rule';
|
2021-12-09 17:01:18 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const WRAPPED_IN_PARENTHESES = 'wrapped_in_parentheses';
|
2022-01-14 15:53:17 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const COMMENT_CLOSURE_RETURN_MIRRORED = 'comment_closure_return_mirrored';
|
2022-08-24 11:51:48 +00:00
|
|
|
/**
|
|
|
|
* To pass PHP 8.0 attribute FQN names
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const PHP_ATTRIBUTE_NAME = 'php_attribute_name';
|
2022-09-05 17:52:37 +00:00
|
|
|
/**
|
|
|
|
* Helper attribute to reprint raw value of int/float/string
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const REPRINT_RAW_VALUE = 'reprint_raw_value';
|
2022-10-15 22:31:48 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const EXTRA_USE_IMPORT = 'extra_use_import';
|
2022-12-23 08:45:28 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const DOC_LABEL = 'docLabel';
|
2023-01-10 11:07:38 +00:00
|
|
|
/**
|
|
|
|
* Prints array in newlined fastion, one item per line
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const NEWLINED_ARRAY_PRINT = 'newlined_array_print';
|
2023-03-30 16:42:45 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
2023-05-22 07:35:57 +00:00
|
|
|
public const IS_ASSIGNED_TO = 'is_assigned_to';
|
2023-05-13 10:12:10 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_GLOBAL_VAR = 'is_global_var';
|
2023-05-13 10:37:59 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_STATIC_VAR = 'is_static_var';
|
2023-05-13 17:37:31 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_BYREF_VAR = 'is_byref_var';
|
2023-05-13 18:07:42 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_BYREF_RETURN = 'is_byref_return';
|
2023-05-17 13:57:56 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const STMT_KEY = 'stmt_key';
|
2023-06-06 11:55:37 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_BEING_ASSIGNED = 'is_being_assigned';
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_MULTI_ASSIGN = 'is_multi_assign';
|
2023-06-07 08:54:42 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const STATEMENT_DEPTH = 'statementDepth';
|
2023-07-05 12:18:11 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const EXPRESSION_DEPTH = 'expressionDepth';
|
2023-06-18 06:01:13 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_IN_LOOP = 'is_in_loop';
|
2023-07-09 01:45:20 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_VARIABLE_LOOP = 'is_variable_loop';
|
2023-06-22 11:51:54 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_IN_IF = 'is_in_if';
|
2023-06-18 09:44:52 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_UNSET_VAR = 'is_unset_var';
|
2023-06-18 13:16:21 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_ARRAY_IN_ATTRIBUTE = 'is_array_in_attribute';
|
2023-06-25 09:59:06 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_NAMESPACE_NAME = 'is_namespace_name';
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_USEUSE_NAME = 'is_useuse_name';
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_STATICCALL_CLASS_NAME = 'is_staticcall_class_name';
|
2023-06-25 16:22:08 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_FUNCCALL_NAME = 'is_funccall_name';
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_CONSTFETCH_NAME = 'is_constfetch_name';
|
2023-06-26 19:09:51 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_NEW_INSTANCE_NAME = 'is_new_instance_name';
|
2023-06-26 13:30:41 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_ARG_VALUE = 'is_arg_value';
|
2023-07-09 01:45:20 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_PARAM_VAR = 'IS_PARAM_VAR';
|
2023-07-09 02:51:17 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_CLASS_EXTENDS = 'is_class_extends';
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_CLASS_IMPLEMENT = 'is_class_implement';
|
2023-06-26 18:07:52 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
2023-06-30 19:13:32 +00:00
|
|
|
public const FROM_FUNC_CALL_NAME = 'from_func_call_name';
|
2023-07-06 21:07:00 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const INSIDE_ARRAY_DIM_FETCH = 'inside_array_dim_fetch';
|
2023-07-27 09:43:37 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public const IS_USED_AS_ARG_BY_REF_VALUE = 'is_used_as_arg_by_ref_value';
|
2018-08-10 11:30:41 +00:00
|
|
|
}
|