We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e62a47 commit d2fff71Copy full SHA for d2fff71
app/Contexts/AbstractContext.php
@@ -117,6 +117,18 @@ public function searchForVar(string $name): AssignmentValue|string|null
117
return $this->parent?->searchForVar($name) ?? null;
118
}
119
120
+ public function addPropertyToNearestClassDefinition(string $name, $types = [])
121
+ {
122
+ if ($this instanceof ClassDefinition) {
123
+ $this->properties[] = [
124
+ 'name' => $name,
125
+ 'types' => $types,
126
+ ];
127
+ } else {
128
+ $this->parent?->addPropertyToNearestClassDefinition($name, $types);
129
+ }
130
131
+
132
public function searchForProperty(string $name)
133
{
134
if ($this instanceof ClassDefinition) {
0 commit comments