fix phpdocs and function names