PhpParser\ParserAbstract::checkProperty PHP Method

checkProperty() protected method

protected checkProperty ( Property $node, $modifierPos )
$node PhpParser\Node\Stmt\Property
    protected function checkProperty(Property $node, $modifierPos) {
        if ($node->flags & Class_::MODIFIER_ABSTRACT) {
            $this->emitError(new Error('Properties cannot be declared abstract',
                $this->getAttributesAt($modifierPos)));
        }

        if ($node->flags & Class_::MODIFIER_FINAL) {
            $this->emitError(new Error('Properties cannot be declared final',
                $this->getAttributesAt($modifierPos)));
        }
    }