mtdowling/ClassPreloader — pull request #13 by rjkip (2013-06-10 18:33:00+00:00)
Title: Use a visitor to wrap non-namespaced code in an empty namespace.

I found that some of the classes were outputted without a namespace, causing a `PHP Fatal error: No code may exist outside of namespace {}`. A quick fix was implemented in #7, but this ignores files with the character sequence `namespace`, regardless of its position. It may appear in a comment, for example.

I've implemented a node visitor that ensures all code is wrapped in an empty/root namespace. I didn't feel it was necessary to make this configurable, so I did not implement an additional command line option.