本文整理匯總了PHP中PhpParser\Node::getMethod方法的典型用法代碼示例。如果您正苦於以下問題:PHP Node::getMethod方法的具體用法?PHP Node::getMethod怎麽用?PHP Node::getMethod使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PhpParser\Node
的用法示例。
在下文中一共展示了Node::getMethod方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: enterNode
/**
* {@inheritdoc}
*/
public function enterNode(Node $node)
{
if ($node instanceof Node\Expr\AssignRef) {
$this->phpFileInfo->addDeprecatedLanguageUsage(new DeprecatedLanguageUsage('assign by reference(&=)', 'Since PHP 5.3 use normal assignment instead.', $node->getLine()));
}
if ($node instanceof Node\Stmt\Class_) {
$method = $node->getMethod($node->name);
if ($method instanceof Node\Stmt\ClassMethod) {
$this->phpFileInfo->addDeprecatedLanguageUsage(new DeprecatedLanguageUsage('PHP4 constructor', 'Since PHP 7.0, use __construct() instead.', $method->getLine()));
}
}
if ($node instanceof Node\Arg) {
if (true === $node->byRef) {
$this->phpFileInfo->addDeprecatedLanguageUsage(new DeprecatedLanguageUsage('call-time pass-by-reference', 'Since PHP 5.3 and removed in PHP 5.4', $node->getLine()));
}
}
}