/** * Is the property public? * * @return bool */ public function isPublic() { return $this->node->isPublic(); }
/** * @param Property $node * * @return RefProperty */ private function createProperty(Property $node) { $ref = new RefProperty(); $ref->class = $this->class; $ref->name = $node->props[0]->name; $ref->default = $this->getValue($node->props[0]->default); if ($node->isPrivate()) { $ref->visibility = Visibility::IS_PRIVATE; } elseif ($node->isProtected()) { $ref->visibility = Visibility::IS_PROTECTED; } elseif ($node->isPublic()) { $ref->visibility = Visibility::IS_PUBLIC; } $ref->isStatic = $node->isStatic(); $ref->line = $node->getLine(); $ref->docComment = $this->createDocComment($node); return $ref; }
/** * {@inheritDoc} */ public function isPublic() { return $this->propertyTypeNode->isPublic(); }
/** * @param Node\Stmt\Property $node */ protected function parseClassPropertyNode(Node\Stmt\Property $node) { foreach ($node->props as $property) { $this->structuralElements[$this->currentStructuralElement->namespacedName->toString()]['properties'][] = ['name' => $property->name, 'startLine' => $node->getLine(), 'isPublic' => $node->isPublic(), 'isPrivate' => $node->isPrivate(), 'isStatic' => $node->isStatic(), 'isProtected' => $node->isProtected(), 'docComment' => $node->getDocComment() ? $node->getDocComment()->getText() : null]; } }