Fixed config parse

This function lacks of type checks and `@param` PHPDoc annotations.