Merge "Add SPARQL client to core"
[lhc/web/wiklou.git] / includes / clientpool / SquidPurgeClientPool.php
index feb80df..f6109f1 100644 (file)
@@ -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" );