CCA code style

Contribution of switching to the cca code styles (https://github.com/MetaModels/core/issues/602).

What this PR contains:
 * Switch of coding standard
 * Split between contao and src folders
 * Some refactoring to pass cyclomatic complexity limit