Question: page-level docBlock in html included file? #695

Closed
sylouuu opened this Issue Dec 4, 2012 · 8 comments

3 participants

@boenrobot

This is a very tricky one... see #604.

@sylouuu

Thank's boenrobot i'm not alone!

It means is it already fixed?

@boenrobot

Unfortunately, no, it's not fixed... and you can see details as to "why" in the linked issue.

Basically, it's a problem with PHP-Parser - the library PhpDocumentor uses to parse files. But solving the issue there would require radical changes in the whole thing.

@sylouuu

Ok, so we must ignore these warnings?

@boenrobot

For now at least, yes.

@boenrobot

Actually, I just remembered... try adding namespace; below your DocBlock, e.g.

<?php
    /**
    * Header content
    *
    * @author  My name
    *
    * @since 1.0.0
    */
    namespace;
?>
<!DOCTYPE html>
<html lang="fr" class="no-js"> 
    <head>

That way, you're creating a statement for the docblock to apply to (which is really all PHP-Parser wants).

PhpDocumentor will treat this as a file level doc block, since "namespace" declarations are not documentable.

If for some reason this too fails, try to define an actual namespace, like namespace ns;.

@mvriel
phpDocumentor member

FYI: there is also an improvement open (#40) to allow filtering of specific error types for specific files/folders. This would also solve your issue

@sylouuu

Nice tip boenrobot, the namespace ns; below the docBlock works! Thank's a lot.

@sylouuu sylouuu closed this Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment