[ticket/10411] Fix typehinting and change private to protected

PHPBB3-10411