* @since 1.22
*/
public static function getBlocksForIPList( array $ipChain, $isAnon, $fromMaster = false ) {
- if ( !count( $ipChain ) ) {
+ if ( $ipChain === [] ) {
return [];
}
$conds[] = self::getRangeCond( IP::toHex( $ipaddr ) );
}
- if ( !count( $conds ) ) {
+ if ( $conds === [] ) {
return [];
}
* @return Block|null The "best" block from the list
*/
public static function chooseBlock( array $blocks, array $ipChain ) {
- if ( !count( $blocks ) ) {
+ if ( $blocks === [] ) {
return null;
} elseif ( count( $blocks ) == 1 ) {
return $blocks[0];