remove missing param phpdoc note
remove unused global
fix phpdocs and some default param types passed into function