Fix variable typo and correct phpdoc