Question

I've never used phpdoc before, but I want the Authorize.Net PHP SDK docs and it seems that I need to generate them with phpdoc.

When I run:

C:\Users\Owner\PhpstormProjects\CRM\anet_php_sdk>C:\Users\Owner\wamp\bin\php\php5.3.13\phpdoc -t phpdocs/  -d lib

I get a stream of "Parsing file" and "No summary for method", which I suppose is ok. A list of object methods and parameters will be enough, even if there is no descriptive summary.

It ends up with this:

Storing cache in "C:\Users\Owner\PhpstormProjects\CRM\anet_php_sdk\phpdocs" .. O    K
Load cache                                                           ..    0.091    s
Preparing template "responsive-twig"                                 ..    0.168    s
Preparing 15 transformations                                         ..    0.000    s
Build "elements" index                                               ..    0.017    s
Replace textual FQCNs with object aliases                            ..    0.214    s
Build "packages" index                                               ..    0.025    s
Build "namespaces" index and add namespaces to "elements"            ..    0.006    s
Transform analyzed project into artifacts                            ..    6.702    s
Analyze results and write report to log                              ..    0.005    s

C:\Users\Owner\PhpstormProjects\CRM\anet_php_sdk>

Which I suppose also is OK.

The outputted directory structure looks like this:

 Directory of C:\Users\Owner\PhpstormProjects\CRM\anet_php_sdk\phpdocs

07/29/2013  03:20 PM    <DIR>          .
07/29/2013  03:20 PM    <DIR>          ..
07/29/2013  03:20 PM    <DIR>          classes
07/29/2013  03:20 PM            16,344 classes.svg
07/29/2013  03:20 PM    <DIR>          css
07/29/2013  03:20 PM             5,713 deprecated.html
07/29/2013  03:20 PM           100,054 errors.html
07/29/2013  03:20 PM             5,717 graph_class.html
07/29/2013  03:20 PM    <DIR>          img
07/29/2013  03:20 PM             7,528 index.html
07/29/2013  03:20 PM    <DIR>          js
07/29/2013  03:20 PM             6,900 markers.html
07/29/2013  03:20 PM    <DIR>          namespaces
07/29/2013  03:20 PM    <DIR>          packages
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-08
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-2b
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-2e
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-48
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-4f
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-62
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-64
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-7a
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-8c
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-a3
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-a6
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-db
07/29/2013  03:20 PM    <DIR>          phpdoc-cache-e0
               6 File(s)        142,256 bytes
              21 Dir(s)  394,722,947,072 bytes free

C:\Users\Owner\PhpstormProjects\CRM\anet_php_sdk\phpdocs>

Seems a bit odd that a bunch of cache is lying around, but whatever OK, I don't know what to expect from phpdoc.

However - The actual docs are unusable. The index is very pretty and green, etc, but every link from the index takes me to a screen that is unformatted and I strongly suspect is missing CSS formatting.

Every link from any of those pages, such as to see a method, is bad. It seems phpdoc put all the files into the wrong places. I've tried sorting them out to make it work but it seems like no matter how much rearranging of the outputted files I do ends up with yet more rearranging required. Besides, I shouldn't need to do this.

What have I done wrong?

Was it helpful?

Solution

There is a bug with the responsive-twig template.
I suggest you try a template like new-black

phpdoc --template=new-black -t phpdocs/ -d lib

Source: Issue954

OTHER TIPS

Well I just had to manually re-arrange all of the phpdoc output. Pretty sloppy IMHO.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top