Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / includes / libs / filebackend / FileBackendStore.php
index 33afe65..97da557 100644 (file)
@@ -644,20 +644,18 @@ abstract class FileBackendStore extends FileBackend {
                }
 
                $stat = $this->cheapCache->getField( $path, 'stat', self::CACHE_TTL );
-               if ( $stat !== null ) {
-                       // If we want the latest data, check that this cached
-                       // value was in fact fetched with the latest available data.
-                       if ( is_array( $stat ) ) {
-                               if (
-                                       ( !$latest || $stat['latest'] ) &&
-                                       ( !$requireSHA1 || isset( $stat['sha1'] ) )
-                               ) {
-                                       return $stat;
-                               }
-                       } elseif ( in_array( $stat, [ 'NOT_EXIST', 'NOT_EXIST_LATEST' ] ) ) {
-                               if ( !$latest || $stat === 'NOT_EXIST_LATEST' ) {
-                                       return false;
-                               }
+               // If we want the latest data, check that this cached
+               // value was in fact fetched with the latest available data.
+               if ( is_array( $stat ) ) {
+                       if (
+                               ( !$latest || $stat['latest'] ) &&
+                               ( !$requireSHA1 || isset( $stat['sha1'] ) )
+                       ) {
+                               return $stat;
+                       }
+               } elseif ( in_array( $stat, [ 'NOT_EXIST', 'NOT_EXIST_LATEST' ], true ) ) {
+                       if ( !$latest || $stat === 'NOT_EXIST_LATEST' ) {
+                               return false;
                        }
                }
 
@@ -1011,7 +1009,7 @@ abstract class FileBackendStore extends FileBackend {
         * @param string $container Resolved container name
         * @param string $dir Resolved path relative to container
         * @param array $params
-        * @return Traversable|array|null Returns null on failure
+        * @return Traversable|string[]|null Returns null on failure
         */
        abstract public function getFileListInternal( $container, $dir, array $params );