| The Red Project

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Pages
util Namespace Reference

## Detailed Description

When I installed docblox, I had the experience that it does not generate any output at all. This script may be used to find that kind of problems with the documentation build process. If docblox generates output, use another approach for debugging.

Basically, docblox takes a list of files to build documentation from. This script assumes there is a file or set of files breaking the build when it is included in that list. It tries to calculate the smallest list containing these files. Unfortunatly, the original problem is NP-complete, so what the script does is a best guess only.

So it starts with a list of all files in the project. If that list can't be build, it cuts it in two parts and tries both parts independently. If only one of them breaks, it takes that one and tries the same independently. If both break, it assumes this is the smallest set. This assumption is not necessarily true. Maybe the smallest set consists of two files and both of them were in different parts when the list was divided, but by now it is my best guess. To make this assumption better, the list is shuffled after every step.

After that, the script tries to remove a file from the list. It tests if the list breaks and if so, it assumes that the file it removed belongs to the set of errorneous files. This is done for all files, so, in the end removing one file leads to a working doc build.

Author
  Alexander Kampmann

This function generates a comma seperated list of file names.

Parameters

  array | $fileset | Set of file names

Returns
  string comma-seperated list of the file names

This functions runs phpdoc on the provided list of files

Parameters

  array | $fileset | Set of filenames

Returns
  bool true, if that set can be built

This functions cuts down a fileset by removing files until it finally works. it was meant to be recursive, but php's maximum stack size is to small. So it just simulates recursion.

In that version, it does not necessarily generate the smallest set, because it may not alter the elements order enough.

Parameters

  array | $fileset | set of filenames
  int | $ps | number of files in subsets

Returns
  array a part of $fileset, that crashes