public static function isComment($include_doc_comment = TRUE) {
    if ($include_doc_comment) {
      return function ($node) {
        if ($node instanceof LineCommentBlockNode) {
          return TRUE;
        }
        elseif ($node instanceof CommentNode) {
          return !($node->parent() instanceof LineCommentBlockNode);
        }
        else {
          return FALSE;
        }
      };
    }
    else {
      return function ($node) {
        if ($node instanceof LineCommentBlockNode) {
          return TRUE;
        }
        elseif ($node instanceof DocCommentNode) {
          return FALSE;
        }
        elseif ($node instanceof CommentNode) {
          return !($node->parent() instanceof LineCommentBlockNode);
        }
        else {
          return FALSE;
        }
      };
    }
  }
public static function isComment($include_doc_comment = TRUE) {
    if ($include_doc_comment) {
      return function ($node) {
        if ($node instanceof LineCommentBlockNode) {
          return TRUE;
        }
        elseif ($node instanceof CommentNode) {
          return !($node->parent() instanceof LineCommentBlockNode);
        }
        else {
          return FALSE;
        }
      };
    }
    else {
      return function ($node) {
        if ($node instanceof LineCommentBlockNode) {
          return TRUE;
        }
        elseif ($node instanceof DocCommentNode) {
          return FALSE;
        }
        elseif ($node instanceof CommentNode) {
          return !($node->parent() instanceof LineCommentBlockNode);
        }
        else {
          return FALSE;
        }
      };
    }
  }
public static function isComment ( $ include_doc_comment = TRUE ) { if ( $ include_doc_comment ) { return function ( $ node ) { if ( $ node instanceof LineCommentBlockNode ) { return TRUE ; } elseif ( $ node instanceof CommentNode ) { return ! ( $ node -> parent ( ) instanceof LineCommentBlockNode ) ; } else { return FALSE ; } } ; } else { return function ( $ node ) { if ( $ node instanceof LineCommentBlockNode ) { return TRUE ; } elseif ( $ node instanceof DocCommentNode ) { return FALSE ; } elseif ( $ node instanceof CommentNode ) { return ! ( $ node -> parent ( ) instanceof LineCommentBlockNode ) ; } else { return FALSE ; } } ; } }
Callback to filter comments.
@param bool $include_doc_comment
@return callable
Callback to filter comments .