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 9050b32 commit 5afaba9Copy full SHA for 5afaba9
src/Node/Identifier.php
@@ -55,6 +55,20 @@ public function __construct(string $value)
55
));
56
}
57
58
+ /**
59
+ * Returns {@see true} if the identifier contains the name of
60
+ * a "virtual" type, i.e. invalid in the PHP namespace.
61
+ *
62
+ * - `SomeClass` - Non-virtual, can be a type in PHP.
63
+ * - `false` - Non-virtual, can be a type in PHP.
64
+ * - `non-empty-array` - Virtual, cannot be defined in PHP.
65
+ * - `empty-string` - Virtual, cannot be defined in PHP.
66
+ */
67
+ public function isVirtual(): bool
68
+ {
69
+ return \str_contains($this->value, '-');
70
+ }
71
+
72
/**
73
* Returns {@see true} in case of name contains special class reference.
74
*/
0 commit comments