Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/class-file-reflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function enterNode( \PHPParser_Node $node ) {
// we don't ignore them, we'll end up picking up docblocks that are already
// associated with a named element, and so aren't really from a non-
// documentable element after all.
if ( ! $this->isNodeDocumentable( $node ) && 'Name' !== $node->getType() && ( $docblock = $node->getDocComment() ) ) {
if ( ! $this->isNodeDocumentable( $node ) && ! in_array( $node->getType(), array( 'Name', 'Stmt_Global' ), true ) && ( $docblock = $node->getDocComment() ) ) {
$this->last_doc = $docblock;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function parse_files( $files, $root ) {

foreach ( $file->getIncludes() as $include ) {
$out['includes'][] = array(
'name' => $include->getName(),
'name' => property_exists( $include->getNode()->expr, 'value' ) ? $include->getName() : '',
'line' => $include->getLineNumber(),
'type' => $include->getType(),
);
Expand Down