Change typehint callback to callable
[lhc/web/wiklou.git] / includes / libs / objectcache / BagOStuff.php
index 82ae5ae..bc5ea46 100644 (file)
@@ -64,7 +64,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface {
        protected $keyspace = 'local';
        /** @var LoggerInterface */
        protected $logger;
-       /** @var callback|null */
+       /** @var callable|null */
        protected $asyncHandler;
        /** @var int Seconds */
        protected $syncTimeout;
@@ -112,11 +112,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface {
         * @param array $params
         */
        public function __construct( array $params = [] ) {
-               if ( isset( $params['logger'] ) ) {
-                       $this->setLogger( $params['logger'] );
-               } else {
-                       $this->setLogger( new NullLogger() );
-               }
+               $this->setLogger( $params['logger'] ?? new NullLogger() );
 
                if ( isset( $params['keyspace'] ) ) {
                        $this->keyspace = $params['keyspace'];