Fix CodeSniffer errors and warnings (final round for API classes)

Change-Id: I97bf36ebef254818dc17378a06405b681ad19c59