PHPMD\Rule\UnusedPrivateField::removeUsedFields PHP Method

removeUsedFields() private method

This method extracts all property postfix nodes from the given class and removes all fields from the $_fields property that are accessed by one of the postfix nodes.
private removeUsedFields ( PHPMD\Node\ClassNode $class ) : void
$class PHPMD\Node\ClassNode
return void
    private function removeUsedFields(ClassNode $class)
    {
        foreach ($class->findChildrenOfType('PropertyPostfix') as $postfix) {
            if ($this->isInScopeOfClass($class, $postfix)) {
                $this->removeUsedField($postfix);
            }
        }
    }