[ticket/11444] Use type_id instead of type_name in methods

PHPBB3-11444
[ticket/11444] Cleanup constructors

PHPBB3-11444
[ticket/11444] Cleanup params and foreach

PHPBB3-11444
[ticket/11444] Cleanup doc blocks

PHPBB3-11444