*/
class SquidPurgeClientPool {
/** @var array Array of SquidPurgeClient */
- protected $clients = array();
+ protected $clients = [];
/** @var int */
protected $timeout = 5;
/**
* @param array $options
*/
- function __construct( $options = array() ) {
+ function __construct( $options = [] ) {
if ( isset( $options['timeout'] ) ) {
$this->timeout = $options['timeout'];
}
$done = false;
$startTime = microtime( true );
while ( !$done ) {
- $readSockets = $writeSockets = array();
+ $readSockets = $writeSockets = [];
/**
* @var $client SquidPurgeClient
*/
}
$exceptSockets = null;
$timeout = min( $startTime + $this->timeout - microtime( true ), 1 );
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$numReady = socket_select( $readSockets, $writeSockets, $exceptSockets, $timeout );
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
if ( $numReady === false ) {
wfDebugLog( 'squid', __METHOD__ . ': Error in stream_select: ' .
socket_strerror( socket_last_error() ) . "\n" );