More phpdoc fixes (including to buildtools templates); clean up whitespace
merge ffb93a17a312425e55f006425b07fbccd4ff2222