PHP Documentation Tips

Recently had to run PhpDocumentor on a project only to be faced with broken documentation after bringing all class files into compliance with proper comments. At first I thought I was missing a config flag for the command-line but, it turns out that the PhpDocumentor-1.4.3 ZIP download contains broken template elements. In the following screenshot, notice how some CSS files have a .cs extenstion and some TPL files have a .tp extension.

Some GIF, JS and PNG files also had the wrong extension. Once I realized that was the issue, I made use of this handy little tool, Renamer, to allow me to run a batch rename on the contents of the HTML folder which holds all the template files.

Renamer for OSX

After the file names were fixed, it was just a matter of adding the images that were missing from the default theme and the generated docs were finally legible. Next step, create a custom theme using the default as a base and make these docs a little prettier 😉

Leave a Reply

Your email address will not be published. Required fields are marked *