Per CC/PHP:
if ( $a = foo() ) {
bar();
}should not be used.
Same with:
$res = $dbr->query( 'SELECT * FROM some_table' );
while ( $row = $dbr->fetchObject( $res ) ) {
showRow( $row );
}A check for that should be implemented. Should also check if a sniff for this has been written already and just needs to be added to our config.