PHPMD\Rule\UnusedPrivateField::isValidPropertyNode PHP Метод

isValidPropertyNode() защищенный Метод

Checks if the given node is a valid property node.
С версии: 0.2.6
protected isValidPropertyNode ( PHPMD\Node\ASTNode $node = null ) : boolean
$node PHPMD\Node\ASTNode
Результат boolean
    protected function isValidPropertyNode(ASTNode $node = null)
    {
        if ($node === null) {
            return false;
        }
        $parent = $node->getParent();
        while (!$parent->isInstanceOf('PropertyPostfix')) {
            if ($parent->isInstanceOf('CompoundVariable')) {
                return false;
            }
            $parent = $parent->getParent();
            if (is_null($parent)) {
                return false;
            }
        }
        return true;
    }