public static unionTypeFromNode ( |
||
$code_base | The code base within which we're operating | |
$context | $context The context of the parser at the node for which we'd like to determine a type | |
$node | ast\Node | mixed | The node for which we'd like to determine its type |
$should_catch_issue_exception | boolean | Set to true to cause loggable issues to be thrown instead |
리턴 | The UnionType associated with the given node in the given Context within the given CodeBase |
/** * @param Context $context * @param CodeBase $code_base * @param Node|string|null $node * * @return UnionType * * @see \Phan\Deprecated\Pass2::node_type * Formerly 'function node_type' */ public static function fromNode(Context $context, CodeBase $code_base, $node) : UnionType { return UnionTypeVisitor::unionTypeFromNode($code_base, $context, $node); }
/** * @param Context $context * The context of the parser at the node for which we'd * like to determine a type * * @param CodeBase $code_base * The code base within which we're operating * * @param Node|string|null $node * The node for which we'd like to determine its type * * @param bool $should_catch_issue_exception * Set to true to cause loggable issues to be thrown * instead of emitted as issues to the log. * * @return UnionType * * @throws IssueException * If $should_catch_issue_exception is false an IssueException may * be thrown for optional issues. */ public static function fromNode(Context $context, CodeBase $code_base, $node, bool $should_catch_issue_exception = true) : UnionType { return UnionTypeVisitor::unionTypeFromNode($code_base, $context, $node, $should_catch_issue_exception); }