Skip to content

Commit c9979a4

Browse files
committed
Merge branch 'feature/github-pull-19' into develop
2 parents a8ccfae + 1acdfe3 commit c9979a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

PHPCtags.class.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class PHPCtags
88
private $mFiles;
99

1010
private static $mKinds = array(
11+
't' => 'trait',
1112
'c' => 'class',
1213
'm' => 'method',
1314
'f' => 'function',
@@ -185,6 +186,13 @@ private function struct($node, $reset=FALSE, $parent=array())
185186
foreach ($node as $subNode) {
186187
$this->struct($subNode, FALSE, array('interface' => $name));
187188
}
189+
} elseif ($node instanceof PHPParser_Node_Stmt_Trait ) {
190+
$kind = 't';
191+
$name = $node->name;
192+
$line = $node->getLine();
193+
foreach ($node as $subNode) {
194+
$this->struct($subNode, FALSE, array('trait' => $name));
195+
}
188196
} elseif ($node instanceof PHPParser_Node_Stmt_Namespace) {
189197
$kind = 'n';
190198
$name = $node->name;

0 commit comments

Comments
 (0)