PHPMD\Rule\UnusedPrivateField::removeUsedField PHP Method

removeUsedField() private method

This method removes the field from the $_fields property that is accessed through the given property postfix node.
private removeUsedField ( PHPMD\Node\ASTNode $postfix ) : void
$postfix PHPMD\Node\ASTNode
return void
    private function removeUsedField(ASTNode $postfix)
    {
        $image = '$';
        $child = $postfix->getFirstChildOfType('Identifier');
        if ($postfix->getParent()->isStatic()) {
            $image = '';
            $child = $postfix->getFirstChildOfType('Variable');
        }
        if ($this->isValidPropertyNode($child)) {
            unset($this->fields[$image . $child->getImage()]);
        }
    }