Add a test for ProjectAnalyzer

As part of the on-going effort to improve Code Coverage for
phpDocumentor I have written a test for the ProjectAnalyzer class
and did minor refactorings for readability.