Fix phpdoc and unused variables