I noticed in https://gerrit.wikimedia.org/r/#/c/434108/3/includes/libs/rdbms/lbfactory/LBFactory.php that the file contains the following code without violations detected by Codesniffer:
$x = [ 'IPAddress' => isset( $_SERVER[ 'REMOTE_ADDR' ] ) ? $_SERVER[ 'REMOTE_ADDR' ] : '', 'UserAgent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '', ];
Note in particular that one line uses spaces within the ['key'] access, and the other does not. Ideally, we would standardise on one of these, at least for the simple cases where the key is a literal string or number.