In-Portal is out there for quite a long time and it doesn't really conform to any existing coding standard (e.g. PSR2 and such).
I think that:
- it's time to develop a Coding Standard
- find a way to automatically check for any standard violations
- make the "Custom" (Developer Kit) module comply to all standards
P.S.
In fact I've developed a coding standard already, but it's not mature yet to be released.