Merge "Remove unnecessary, unoptimized, unused overview SVG"
[lhc/web/wiklou.git] / includes / site / HashSiteStore.php
index 198d331..f0a6e54 100644 (file)
@@ -37,7 +37,7 @@ class HashSiteStore implements SiteStore {
        private $sites = [];
 
        /**
-        * @param array $sites
+        * @param Site[] $sites
         */
        public function __construct( $sites = [] ) {
                $this->saveSites( $sites );
@@ -87,11 +87,7 @@ class HashSiteStore implements SiteStore {
         * @return Site|null
         */
        public function getSite( $globalId, $source = 'cache' ) {
-               if ( isset( $this->sites[$globalId] ) ) {
-                       return $this->sites[$globalId];
-               } else {
-                       return null;
-               }
+               return $this->sites[$globalId] ?? null;
        }
 
        /**
@@ -113,6 +109,7 @@ class HashSiteStore implements SiteStore {
        /**
         * Deletes all sites from the database. After calling clear(), getSites() will return an empty
         * list and getSite() will return null until saveSite() or saveSites() is called.
+        * @return bool
         */
        public function clear() {
                $this->sites = [];