better phpdoc validity checking