filebackend: Fix and add missing @return documentation

array[]|bool[]|null[] means: It's either an array of arrays, an array
that contains only bools, or an array where all values are null. But
this is not what's happening here, as far as I can tell.

This minor fixup is motivated by T348688, but doesn't solve it.
However, now it's more obvious that the values that trigger the
reported error are "null", i.e. some instance of self::$RES_ERROR.

Bug: T348688
Change-Id: Ia9debe97d21a3abff7bff75f16a94bec8be6ddc5
This commit is contained in:
thiemowmde 2023-10-16 11:47:15 +02:00
parent 31da51cec0
commit 17ae460968

View file

@ -744,7 +744,7 @@ abstract class FileBackendStore extends FileBackend {
/**
* Ingest file stat entries that just came from querying the backend (not cache)
*
* @param array[]|bool[]|null[] $stats Map of (path => doGetFileStat() stype result)
* @param array<string,array|false|null> $stats Map of storage path => {@see doGetFileStat} result
* @param bool $latest Whether doGetFileStat()/doGetFileStatMulti() had the 'latest' flag
* @return bool Whether all files have non-error stat replies
*/
@ -811,6 +811,7 @@ abstract class FileBackendStore extends FileBackend {
/**
* @see FileBackendStore::getFileStat()
* @param array $params
* @return array|false|null
*/
abstract protected function doGetFileStat( array $params );
@ -1504,7 +1505,7 @@ abstract class FileBackendStore extends FileBackend {
*
* @see FileBackend::clearCache()
*
* @param array|null $paths Storage paths (optional)
* @param string[]|null $paths Storage paths (optional)
*/
protected function doClearCache( array $paths = null ) {
}
@ -1534,7 +1535,8 @@ abstract class FileBackendStore extends FileBackend {
* @param array $params Parameters include:
* - srcs : list of source storage paths
* - latest : use the latest available data
* @return array|null Map of storage paths to array|bool|null (returns null if not supported)
* @return array<string,array|false|null>|null Null if not supported. Otherwise a map of storage
* path to attribute map, false (missing file), or null (I/O error).
* @since 1.23
*/
protected function doGetFileStatMulti( array $params ) {