Fix PHP CodeSniffer errors and warnings

Extension should pass now.

Change-Id: Iba8099de37b2c2f4c8f2a26eceba9fecf69cd9f5
Merge "Fix PHP CodeSniffer errors and warnings"