[ticket/12656] Rectify coding style and refactoring.

PHPBB3-12656
[ticket/12656] Fix coding style and doc-blocks.

PHPBB3-12656