X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fclientpool%2FSquidPurgeClientPool.php;h=f6109f1d88d3cc3f74041d0a43cc2a402f29a590;hb=7b95c9e1842aabc190812794a1ceaaca142a4141;hp=feb80df9f88bcc02091f53648326fdd0ac11e761;hpb=9342ee78a6ee8617f1604f6c374eeea1da0ba2ef;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/clientpool/SquidPurgeClientPool.php b/includes/clientpool/SquidPurgeClientPool.php index feb80df9f8..f6109f1d88 100644 --- a/includes/clientpool/SquidPurgeClientPool.php +++ b/includes/clientpool/SquidPurgeClientPool.php @@ -21,7 +21,7 @@ */ class SquidPurgeClientPool { /** @var array Array of SquidPurgeClient */ - protected $clients = array(); + protected $clients = []; /** @var int */ protected $timeout = 5; @@ -29,7 +29,7 @@ class SquidPurgeClientPool { /** * @param array $options */ - function __construct( $options = array() ) { + function __construct( $options = [] ) { if ( isset( $options['timeout'] ) ) { $this->timeout = $options['timeout']; } @@ -47,7 +47,7 @@ class SquidPurgeClientPool { $done = false; $startTime = microtime( true ); while ( !$done ) { - $readSockets = $writeSockets = array(); + $readSockets = $writeSockets = []; /** * @var $client SquidPurgeClient */ @@ -66,9 +66,9 @@ class SquidPurgeClientPool { } $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" );