Skip to content

Commit 27a4a34

Browse files
Implement ::isNamespaced() method
1 parent 4e12098 commit 27a4a34

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/StaticAnalysis/Value/Class_.php

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ public function namespacedName(): string
9494
return $this->namespacedName;
9595
}
9696

97+
public function isNamespaced(): bool
98+
{
99+
return $this->namespace !== '';
100+
}
101+
97102
public function namespace(): string
98103
{
99104
return $this->namespace;

src/StaticAnalysis/Value/Function_.php

+5
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ public function namespacedName(): string
8080
return $this->namespacedName;
8181
}
8282

83+
public function isNamespaced(): bool
84+
{
85+
return $this->namespace !== '';
86+
}
87+
8388
public function namespace(): string
8489
{
8590
return $this->namespace;

src/StaticAnalysis/Value/Interface_.php

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ public function namespacedName(): string
7373
return $this->namespacedName;
7474
}
7575

76+
public function isNamespaced(): bool
77+
{
78+
return $this->namespace !== '';
79+
}
80+
7681
public function namespace(): string
7782
{
7883
return $this->namespace;

src/StaticAnalysis/Value/Trait_.php

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ public function namespacedName(): string
7373
return $this->namespacedName;
7474
}
7575

76+
public function isNamespaced(): bool
77+
{
78+
return $this->namespace !== '';
79+
}
80+
7681
public function namespace(): string
7782
{
7883
return $this->namespace;

0 commit comments

Comments
 (0)