Use PHP 7 '??' operator instead of if-then-else
[lhc/web/wiklou.git] / includes / libs / objectcache / BagOStuff.php
index 82ae5ae..c6bcc7a 100644 (file)
@@ -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'];