Fix CodeSniffer and warnings in includes/db