registration: Use null coalescing operator
authorMGChecker <hgasuser@gmail.com>
Tue, 4 Sep 2018 01:39:41 +0000 (03:39 +0200)
committerLegoktm <legoktm@member.fsf.org>
Tue, 4 Sep 2018 01:42:55 +0000 (01:42 +0000)
Change-Id: Iba5df6fe8c647baaaff91df311efec22cca7e88f

includes/registration/ExtensionRegistry.php

index 8429afa..1f8a27e 100644 (file)
@@ -408,11 +408,7 @@ class ExtensionRegistry {
         * @return array
         */
        public function getAttribute( $name ) {
-               if ( isset( $this->attributes[$name] ) ) {
-                       return $this->attributes[$name];
-               } else {
-                       return [];
-               }
+               return $this->attributes[$name] ?? [];
        }
 
        /**